// eslint-disable-next-line
import { UserLayout, BasicLayout, BlankLayout, RouteView, LoginLayout } from '@/layouts'
import storage from 'store'
import cutPrice from '@/config/modules/Marketing/cutPrice'
import chartGpt from '@/config/modules/chartGpt/chartGpt'
import maltField from './modules/Marketing/maltField'

// const RouteView = {
//   name: 'RouteView',
//   render: (h) => h('router-view')
// }
const host = window.location.protocol + '//' + window.location.host

// let redirectPath = '/dashboard'

// if (storage.get('isPlatform')) {
//   console.log(storage.get('isSupplier'), '123123123')
//   if (storage.get('isSupplier')) {
//     redirectPath = '/saas/supplierPurchase'
//   } else {
//     redirectPath = '/saas/store/list'
//   }
// }

const files = require.context("./modules", false, /\.js$/);
const routes = [];
files.keys().forEach(key => {
  console.log(...files(key).default);
  routes.push(...files(key).default);
});

export const asyncRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: 'menu.home' },
    redirect: 'dashboard',
    children: [
      // dashboard
      {
        path: '/dashboard',
        name: 'dashboard',
        redirect: '/dashboard/analysis',
        component: RouteView,
        meta: { title: '概况', icon: 'dashboard' },
        children: [
          {
            path: '/dashboard/analysis',
            name: 'Analysis',
            hidden: true,
            component: () => import('@/views/dashboard/Analysis'),
            meta: { title: '概览', keepAlive: false }
          }
        ]
      },

      ...routes,

      {
        path: '/exception',
        name: 'exception',
        component: import('@/layouts/RouteView'),
        redirect: '/exception/403',
        meta: { title: '异常页', icon: 'warning', permission: ['exception'] },
        children: [
          {
            path: '/exception/403',
            name: 'Exception403',
            component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/403'),
            meta: { title: '403', permission: ['exception'] }
          },
          {
            path: '/exception/404',
            name: 'Exception404',
            component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404'),
            meta: { title: '404', permission: ['exception'] }
          },
          {
            path: '/exception/500',
            name: 'Exception500',
            component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/500'),
            meta: { title: '500', permission: ['exception'] }
          }
        ]
      },


      // 统计管理
      {
        path: '/statistic',
        name: 'DataStatistic',
        component: RouteView,
        redirect: '/statistic/goods',
        meta: { title: '统计', icon: 'radar-chart', permission: ['statistic'] },
        children: [
          {
            path: '/statistic/goods',
            name: 'GoodsStatistic',
            component: () => import('@/views/statistic/goods/sale'),
            meta: {
              title: '商品销售统计',
              icon: 'gold',
              permission: ['goodsStatistic']
            }
          },
          {
            path: '/statistic/data',
            name: 'DataStatistic',
            component: () => import('@/views/statistic/data/collect'),
            meta: {
              title: '数据统计',
              icon: 'gold',
              permission: ['dataStatistic']
            }
          }
          // {
          //   path: '/statistic/mch',
          //   name: 'MchStatistic',
          //   component: RouteView,
          //   component: () => import('@/views/statistic/mch/count'),
          //   meta: {
          //     title: '商户数据统计',
          //     icon: 'gold',
          //     permission: ['mchStatistic']
          //   }
          // }
        ]
      },
      // 商城管理
      {
        path: '/setting',
        name: 'Setting',
        component: RouteView,
        redirect: '/setting/setting',
        meta: { title: '商城', icon: 'shop', permission: ['setting'] },
        children: [
          {
            path: '/setting/setting',
            name: 'SettingEdit',
            component: () => import('@/views/setting/Setting'),
            meta: {
              title: '功能设置',
              permission: ['settingEdit']
            }
          },
          {
            path: '/setting/rules-setting',
            name: 'rulesSetting',
            component: RouteView,
            redirect: '/setting/postage',
            meta: {
              title: '规则设置',
              permission: ['rulesSetting']
            },
            children: [
              {
                path: '/setting/postage',
                name: 'PostageList',
                component: () => import('@/views/setting/Postage'),
                meta: {
                  title: '运费规则',
                  permission: ['postageList']
                }
              },
              {
                path: '/setting/free-delivery',
                name: 'FreeDelivery',
                component: () => import('@/views/setting/FreeDelivery'),
                meta: {
                  title: '包邮规则',
                  permission: ['freeDelivery']
                }
              },
              {
                path: '/setting/territorial',
                name: 'Territorial',
                component: () => import('@/views/setting/Territorial'),
                meta: {
                  title: '区域限购',
                  permission: ['territorial']
                }
              },
              {
                path: '/setting/offer-price',
                name: 'OfferPrice',
                component: () => import('@/views/setting/OfferPrice'),
                meta: {
                  title: '起送规则',
                  permission: ['offerPrice']
                }
              },
              {
                path: '/setting/refund-address',
                name: 'RefundAddress',
                component: () => import('@/views/setting/RefundAddress'),
                meta: {
                  title: '退货地址设置',
                  permission: ['refundAddress']
                }
              },
              {
                path: '/setting/distribution-rules',
                name: 'DistributionRules',
                component: () => import('@/views/setting/DistributionRules'),
                meta: {
                  title: '配送规则',
                  permission: ['distributionRules']
                }
              },
              {
                path: '/setting/SalesRules',
                name: 'SalesRules',
                component: () => import('@/views/setting/SalesRules'),
                meta: {
                  title: '销售区域规则',
                  permission: ['postageList']
                }
              },
            ]
          },
          {
            path: '/setting/notice',
            name: 'Notice',
            component: () => import('@/views/setting/Notice'),
            meta: {
              title: '消息通知',
              permission: ['noticeConfig']
            }
          },
          {
            path: '/setting/print-setting',
            name: 'printSetting',
            component: RouteView,
            redirect: '/setting/express',
            meta: {
              title: '打印设置',
              permission: ['printSetting']
            },
            children: [
              {
                path: '/setting/express',
                name: 'Express',
                component: () => import('@/views/setting/Express'),
                meta: {
                  title: '电子面单',

                  permission: ['express']
                }
              },
              {
                path: '/setting/cloud',
                name: 'Cloud',
                component: () => import('@/views/setting/Cloud'),
                meta: {
                  title: '云打印设置',

                  permission: ['cloud']
                }
              },
              {
                path: '/setting/printer',
                name: 'Printer',
                component: () => import('@/views/setting/Printer'),
                meta: {
                  title: '小票打印',

                  permission: ['printer']
                }
              },
              {
                path: '/setting/printer-order-setting',
                name: 'PrinterOrderSetting',
                component: () => import('@/views/setting/PrinterOrderSetting'),
                meta: {
                  title: '订单打印设置',
                  permission: ['printOrderSetting']
                }
              }
            ]
          },
          {
            path: '/setting/goods-reviewed',
            name: 'GoodsReviewed',
            component: RouteView,
            meta: {
              title: '小程序提审商品',
              permission: ['GoodsReviewed']
            },
            component: () => import('@/views/setting/GoodsReviewed')
          },
        ]
      },
      // 商品管理
      {
        path: '/goods',
        name: 'Goods',
        component: RouteView,
        redirect: '/goods/List',
        meta: { title: '商品', icon: 'shopping', permission: ['goods'] },
        children: [
          {
            path: '/goods/List',
            name: 'GoodsList',
            component: () => import('@/views/goods/List'),
            meta: {
              title: '商品列表',
              permission: ['goods']
            }
          },
          {
            path: '/goods/Edit',
            name: 'GoodsEdit',
            hidden: true,
            component: () => import('@/views/goods/Edit'),
            meta: {
              title: '商品列表编辑',
              keepAlive: false,
              permission: ['goods']
            }
          },
          // {
          //   path: '/goods/Add',
          //   name: 'GoodsAdd',
          //   hidden: true,
          //   component: () => import('@/views/goods/Edit'),
          //   meta: {
          //     title: '添加商品',
          //     keepAlive: false,
          //     permission: ['typesOrdinary']
          //   }
          // },
          {
            path: '/goods/typesHotelGoods',
            name: 'typesHotelGoods',
            component: () => import('@/views/goods/productTypes/hotel/List.vue'),
            meta: {
              title: '酒店商品',
              permission: ['typesHotelGoods']
            }
          },
          {
            path: '/goods/typesHotelGoodsEdit',
            name: 'typesHotelGoodsEdit',
            hidden: true,
            component: () => import('@/views/goods/productTypes/hotel/Edit.vue'),
            meta: {
              title: '酒店商品编辑',
              keepAlive: false,
              permission: ['typesHotelGoods']
            }
          },
          {
            path: '/goods/typesServiceGoods',
            name: 'typesServiceGoods',
            component: () => import('@/views/goods/productTypes/service/List.vue'),
            meta: {
              title: '预约商品',
              permission: ['typesServiceGoods']
            }
          },
          {
            path: '/goods/typesServiceGoodsEdit',
            name: 'typesServiceGoodsEdit',
            hidden: true,
            component: () => import('@/views/goods/productTypes/service/Edit.vue'),
            meta: {
              title: '预约商品编辑',
              keepAlive: false,
              permission: ['typesServiceGoods']
            }
          },
          {
            path: '/goods/typesVirtualGoods',
            name: 'typesVirtualGoods',
            component: () => import('@/views/goods/productTypes/virtual/List.vue'),
            meta: {
              title: '虚拟商品',
              permission: ['typesVirtualGoods']
            }
          },
          {
            path: '/goods/typesVirtualGoodsEdit',
            name: 'typesVirtualGoodsEdit',
            hidden: true,
            component: () => import('@/views/goods/productTypes/virtual/Edit.vue'),
            meta: {
              title: '虚拟商品编辑',
              keepAlive: false,
              permission: ['typesVirtualGoods']
            }
          },

          {
            path: '/goods/typesCardGoods',
            name: 'typesCardGoods',
            component: () => import('@/views/goods/productTypes/card/List.vue'),
            meta: {
              title: '套餐商品',
              permission: ['typesCardGoods']
            }
          },
          {
            path: '/goods/typesCardGoodsEdit',
            name: 'typesCardGoodsEdit',
            hidden: true,
            component: () => import('@/views/goods/productTypes/card/Edit.vue'),
            meta: {
              title: '套餐商品编辑',
              keepAlive: false,
              permission: ['typesCardGoods']
            }
          },
          {
            path: '/goods/cat/List',
            name: 'CatList',
            component: () => import('@/views/goods/cat/List'),
            meta: {
              title: '分类列表',

              permission: ['catList']
            }
          },
          {
            path: '/goods/attr/List',
            name: 'AttrList',
            component: () => import('@/views/goods/attr/List'),
            meta: {
              title: '规格库',

              permission: ['attrList']
            }
          },
          {
            path: '/goods/recommend-keyword',
            name: 'GoodsRecommendKeyword',
            component: () => import('@/views/goods/RecommendKeyword'),
            meta: {
              title: '搜索发现关键词',

              permission: ['goodsRecommendKeyword']
            }
          },
        ]
      },
      // 订单管理
      {
        path: '/order',
        name: 'OrderManage',
        component: RouteView,
        redirect: '/order/list',
        meta: { title: '订单', icon: 'profile', permission: ['orderManage'] },
        children: [
          {
            path: '/order/list',
            name: 'OrderList',
            component: () => import('@/views/order/List'),
            meta: { title: '订单列表', permission: ['orderList'] }
          },
          {
            path: '/order/offline-list',
            name: 'OrderOfflineList',
            component: () => import('@/views/order/OfflineList'),
            meta: { title: '自提订单', permission: ['orderOfflineList'] }
          },
          {
            path: '/order/refund-list',
            name: 'OrderRefundList',
            component: () => import('@/views/order/RefundList'),
            meta: { title: '售后订单', permission: ['orderRefundList'] }
          },
          {
            path: '/order/order-details',
            name: 'OrderDetails',
            hidden: true,
            component: () => import('@/views/order/OrderDetails'),
            meta: { title: '订单详情', keepAlive: false, permission: ['orderList'] }
          },
          {
            path: '/order/order-details-new',
            name: 'OrderDetails',
            hidden: true,
            component: () => import('@/views/order/OrderDetailsNew'),
            meta: { title: '订单详情', keepAlive: false, permission: ['orderList'] }
          },
          {
            path: '/order/comment',
            name: 'OrderComment',
            component: () => import('@/views/order/Comment'),
            meta: { title: '评价管理', permission: ['orderComment'] }
          },
          {
            path: '/order/scan-list',
            name: 'OrderScanList',
            component: () => import('@/views/order/ScanList'),
            meta: { title: '当面付订单', permission: ['orderScanList'] }
          },
          {
            path: '/order/SubscribeOrder',
            name: 'SubscribeOrderList',
            component: () => import('@/views/order/SubscribeOrderList'),
            meta: { title: '预约订单', permission: ['orderList'] }
          },
          {
            path: '/order/deliveryOrder',
            name: 'deliveryOrder',
            component: () => import('@/views/order/deliveryOrder/index'),
            meta: { title: '云仓配送单', permission: ['cloudOrderList'] }
          },
        ]
      },
      // 装修
      {
        path: host + '/diy/#/index',
        name: 'newDiy',
        meta: {
          title: '装修',
          icon: 'tablet',
          target: '_blank',
          permission: ['newDiy']
        },
        children: []
      },
      // 用户管理
      {
        path: '/user/manage',
        name: 'UserManage',
        component: RouteView,
        redirect: '/user/manage/user-manage',
        meta: { title: '用户', icon: 'user', permission: ['userManage'] },
        children: [
          {
            path: '/user/manage/user-manage',
            name: 'UserManagement',
            component: () => import('@/views/user/manage/UserManage'),
            meta: { title: '用户管理', permission: ['userManagement'] }
          },
          {
            path: '/user/manage/member-manage',
            name: 'MemberManage',
            component: RouteView,
            meta: { title: '会员等级', permission: ['memberManage'] },
            redirect: '/user/manage/member-level',
            children: [
              {
                path: '/user/manage/member-level',
                name: 'MemberLevel',
                component: () => import('@/views/user/manage/MemberLevel'),
                meta: { title: '会员等级', permission: ['memberLevel'] }
              },
              {
                path: '/user/manage/member-level-record',
                name: 'MemberLevelRecord',
                component: () => import('@/views/user/manage/MemberLevelRecord'),
                meta: { title: '购买记录', permission: ['levelOrderList'] }
              }
            ]
          },
          {
            path: '/user/manage/user-admin',
            name: 'UserAdmin',
            component: () => import('@/views/user/manage/UserAdmin'),
            meta: { title: '手机端管理员', permission: ['userAdmin'] }
          },
          {
            path: '/user/manage/user-detail',
            name: 'userDetail',
            hidden: true,
            component: () => import('@/views/user/manage/userDetail'),
            meta: { title: '用户详情', keepAlive: false, permission: ['userManagement'] }
          },
        ]
      },
      // 营销管理
      {
        path: '/auth',
        name: 'AuthManage',
        component: RouteView,
        redirect: '/auth/admin-list',
        meta: { title: '员工', icon: 'safety', permission: ['authManage'] },
        children: [
          {
            path: '/auth/admin-list',
            name: 'AdminList',
            component: () => import('@/views/auth/AdminList'),
            meta: { title: '账号管理', permission: ['accountManage'], type:1  }
          },
          {
            path: '/auth/role-list',
            name: 'RoleList',
            component: () => import('@/views/auth/RoleList'),
            meta: { title: '角色管理', permission: ['roleManage'], type:1  }
          }
        ]
      },
      // 营销
      {
        path: '/marketing',
        name: 'Marketing',
        component: RouteView,
        redirect: '/marketing/coupon-list',
        meta: { title: '营销', icon: 'gold', permission: ['marketingManage'] },
        children: [
          {
            path: '/content/about-article-list',
            name: 'AboutArticleList',
            component: () => import('@/views/content/aboutArticleList'),
            meta: { title: '文章', permission: ['aboutArticleManage'] }
          },
          {
            path: '/content/video-list',
            name: 'VideoList',
            component: () => import('@/views/content/videoList'),
            meta: { title: '视频', permission: ['videoManage'] }
          },
          {
            path: '/content/sproject',
            name: 'SProject',
            component: RouteView,
            redirect: '/content/article-list',
            meta: { title: '专题', permission: ['topicManage'] },
            children: [
              {
                path: '/content/article-list',
                name: 'ArticleList',
                component: () => import('@/views/content/articleList'),
                meta: { title: '专题列表', permission: ['topicList'] }
              },
              {
                path: '/content/project-list',
                name: 'ProjectList',
                component: () => import('@/views/content/projectList'),
                meta: { title: '专题分类', permission: ['topicCat'] }
              }
            ]
          },
          {
            path: '/marketing/coupon',
            name: 'CouponSelf',
            component: RouteView,
            redirect: '/marketing/coupon/list',
            meta: {
              title: '优惠券',
              icon: 'gold',
              permission: ['couponManage']
            },
            children: [
              {
                path: '/marketing/coupon/list',
                name: 'CouponList',
                component: () => import('@/views/marketing/coupon/couponTable'),
                meta: {
                  title: '优惠券列表',
                  permission: ['couponList']
                }
              },
              {
                path: '/marketing/coupon/send-rules',
                name: 'SendRules',
                component: () => import('@/views/marketing/coupon/couponRuleTable'),
                meta: {
                  title: '发放规则',
                  permission: ['couponAutoSendManage']
                }
              },
              {
                path: '/marketing/coupon/detail',
                name: 'CouponDetail',
                hidden: true,
                component: () => import('@/views/marketing/coupon/CouponDetail'),
                meta: {
                  title: '优惠券详情',
                  permission: ['couponList'],
                  children: []
                }
              },
              {
                path: '/marketing/coupon/saas-coupon',
                name: 'SaasCoupon',
                component: () => import('@/views/marketing/coupon/saasCoupon'),
                meta: {
                  title: '联盟优惠券',
                  permission: ['couponListManageBusiness']
                }
              },
              {
                path: '/marketing/coupon/saas-coupon-detail',
                name: 'SaasCouponDetail',
                hidden: true,
                component: () => import('@/views/marketing/coupon/saasCouponDetail'),
                meta: {
                  title: '联盟优惠券详情',
                  permission: ['couponListManageBusiness']
                }
              }
            ]
          },
          {
            path: '/marketing/verify',
            name: 'verifyCard',
            component: RouteView,
            redirect: '/marketing/verify-list',
            meta: {
              title: '卡劵',
              icon: 'gold',
              permission: ['cardCouponManage']
            },
            children: [
              {
                path: '/marketing/verify-list',
                name: 'VerifyList',
                component: () => import('@/views/marketing/verify/VerifyList'),
                meta: {
                  title: '卡劵管理',
                  permission: ['cardCouponManage']
                }
              },
              {
                path: '/marketing/verify-detail',
                name: 'VerifyDetail',
                hidden: true,
                component: () => import('@/views/marketing/verify/verify-detail'),
                meta: {
                  title: '卡劵详情',
                  permission: ['cardCouponManage']
                }
              },
              {
                path: '/marketing/saas-verify',
                name: 'SaasVerifyList',
                component: () => import('@/views/marketing/verify/saasVerifyList'),
                meta: {
                  title: '联盟卡券',
                  permission: ['verifyBusinessManage']
                }
              },
              {
                path: '/marketing/saas-verify-detail',
                name: 'SaasVerifyDetail',
                hidden: true,
                component: () => import('@/views/marketing/verify/saasVerifyDetail'),
                meta: {
                  title: '联盟卡券详情',
                  permission: ['verifyBusinessManage']
                }
              }
              // {
              //   path: '/marketing/verify-order',
              //   name: 'VerifyOrder',
              //   component: () => import('@/views/marketing/verify/VerifyOrder'),
              //   meta: {
              //     title: '卡劵订单',
              //     permission: ['verifyOrderManage']
              //   }
              // }
            ]
          },
          {
            path: '/marketing/recharge-precept',
            name: 'RechargePrecept',
            component: RouteView,
            redirect: '/marketing/recharge-precept',
            meta: { title: '充值', permission: ['rechargePreceptManage'] },
            children: [{
              path: '/marketing/recharge-precept',
              name: 'RechargePrecept',
              component: () => import('@/views/marketing/RechargePrecept'),
              meta: { title: '充值方案', permission: ['rechargePreceptManage'] },
            }, {
              path: '/marketing/recharge-order',
              name: 'RechargeOrder',
              component: () => import('@/views/marketing/RechargeOrder'),
              meta: { title: '充值记录', permission: ['rechargePreceptManage'] },
            }, {
              path: '/marketing/recharge-order-after-sales',
              name: 'rechargeOrderAfterSales',
              component: () => import('@/views/marketing/RechargeOrderAfterSales'),
              meta: { title: '充值售后', permission: ['rechargePreceptManage'] },
            }]
          },
          {
            path: '/share',
            name: 'ShareManage',
            component: RouteView,
            redirect: '/share/distributor-verify',
            meta: { title: '分销管理', icon: 'team', permission: ['shareManage'] },
            children: [
              {
                path: '/share/distributor-verify',
                name: 'ShareDistributorVerify',
                component: () => import('@/views/share/DistributorVerify'),
                meta: { title: '分销商审核', permission: ['shareUserCheck'] }
              },
              {
                path: '/share/distributor',
                name: 'ShareDistributor',
                component: () => import('@/views/share/Distributor'),
                meta: { title: '分销商', permission: ['shareUserList'] }
              },
              {
                path: '/user/manage/distributor',
                name: 'UserDistributor',
                component: () => import('@/views/user/manage/distributor/index'),
                meta: { title: '分销商等级', permission: ['shareManage'] }
              },
              {
                path: '/share/order',
                name: 'ShareOrder',
                component: () => import('@/views/share/Order'),
                meta: { title: '分销订单', permission: ['shareOrder'] }
              },
              {
                path: '/share/cash',
                name: 'ShareCash',
                component: () => import('@/views/share/Cash'),
                meta: { title: '分销提现', permission: ['shareCash'] }
              },
              {
                path: '/share/basic-setting',
                name: 'ShareBasicSetting',
                component: () => import('@/views/share/BasicSetting'),
                meta: { title: '基础设置', permission: ['shareBasicSetting'] }
              },
              {
                path: '/share/member-commission',
                name: 'MemberCommission',
                component: () => import('@/views/share/MemberCommission'),
                meta: { title: '佣金设置', permission: ['shareMoneySetting'] }
              },
              {
                path: '/share/distributorDetail',
                name: 'ShareDistributorDetail',
                hidden: true,
                component: () => import('@/views/share/DistributorDetail'),
                meta: { title: '分销商详情', hidden: true, permission: ['shareUserList'] }
              },
              // {
              //   path: '/share/user-list',
              //   name: 'ShareUserList',
              //   component: () => import('@/views/share/UserList'),
              //   meta: { title: '分销商列表', permission: ['shareUserList'] }
              // },
              // {
              //   path: '/share/money-setting',
              //   name: 'ShareMoneySetting',
              //   component: () => import('@/views/share/MoneySetting'),
              //   meta: { title: '佣金设置', keepAlive: false, permission: ['shareMoneySetting'] }
              // },
              {
                path: '/share/poster',
                name: 'SharePoster',
                component: () => import('@/views/share/Poster'),
                meta: { title: '推广海报', permission: ['sharePoster'] }
              }
            ]
          },
          {
            path: '/pt',
            name: 'pt',
            redirect: '/pt/order',
            meta: { title: '拼团', icon: 'profile', permission: ['pintuan'] },
            component: RouteView,
            children: [
              {
                path: '/pt/order',
                name: 'ptOrder',
                component: () => import('@/views/pt/order'),
                meta: {
                  title: '拼团订单',
                  permission: ['pintuan']
                }
              },
              {
                path: '/pt/activity',
                name: 'ptActivity',
                component: () => import('@/views/pt/activity'),
                meta: {
                  title: '拼团活动',
                  permission: ['pintuan']
                }
              },
              {
                path: '/pt/classification',
                name: 'ptClassification',
                component: () => import('@/views/pt/classification'),
                meta: {
                  title: '活动分类',
                  permission: ['pintuan']
                }
              },
              // {
              //   path: '/pt/afterSalesOrder',
              //   name: 'ptAfterSalesOrder',
              //   component: () => import('@/views/pt/afterSalesOrder'),
              //   meta: {
              //     title: '售后订单',
              //   }
              // },
              // {
              //   path: '/pt/comment',
              //   name: 'ptComment',
              //   component: () => import('@/views/pt/comment'),
              //   meta: {
              //     title: '拼团评论',
              //   }
              // },
              {
                path: '/pt/ad',
                name: 'ptAd',
                component: () => import('@/views/pt/ad'),
                meta: {
                  title: '轮播广告',
                  permission: ['pintuan']
                }
              },
              {
                path: '/pt/setting',
                name: 'ptSetting',
                component: () => import('@/views/pt/setting'),
                meta: {
                  title: '拼团设置',
                  permission: ['pintuan']
                }
              },
              {
                path: '/pt/edit',
                name: 'ptEdit',
                component: () => import('@/views/pt/edit'),
                meta: {
                  title: '活动详情',
                  permission: ['pintuan']
                },
                hidden: true
              },
              {
                path: '/pt/orderDetail',
                name: 'ptOrderDetail',
                component: () => import('@/views/pt/orderDetail'),
                meta: {
                  title: '拼团信息',
                  permission: ['pintuan']
                },
                hidden: true
              }
            ]
          },
          ...cutPrice,
          {
            path: '/marketing/seckill',
            name: 'marketingSeckill',
            component: RouteView,
            redirect: '/marketing/seckill/list',
            meta: {
              title: '限时秒杀',
              permission: ['seckill']
            },
            children: [
              {
                path: '/marketing/seckill/list',
                name: 'seckillList',
                component: () => import('@/views/marketing/seckill/list.vue'),
                meta: { title: '限时秒杀', hidden: true, permission: ['seckill'] }
              },
              {
                path: '/marketing/seckill/edit',
                name: 'seckillEdit',
                hidden: true,
                component: () => import('@/views/marketing/seckill/edit.vue'),
                meta: { title: '秒杀详情', hidden: true, permission: ['seckill'] }
              },
            ]
          },
          // 小程序直播
          {
            path: '/wxlive',
            name: 'Wxlive',
            component: RouteView,
            redirect: '/plugins/wxlive/list',
            meta: { title: '小程序直播', permission: ['wxLive'] },
            children: [
              {
                path: '/plugins/wxlive/list',
                name: 'WxliveList',
                component: () => import('@/plugins/wxlive/list'),
                meta: { title: '直播间列表', permission: ['wxLiveRoomList'] }
              },
              {
                path: '/plugins/wxlive/goodsList',
                name: 'WxliveGoodsList',
                component: () => import('@/plugins/wxlive/goodsList'),
                meta: { title: '商品列表', permission: ['wxLiveGoodsList'] }
              }
            ]
          },
          // 短视频
          {
            path: '/videoGoods',
            name: 'VideoGoods',
            component: RouteView,
            redirect: '/videoGoods/worksList',
            meta: { title: '短视频', permission: ['videoGoods'] },
            children: [
              {
                path: '/videoGoods/worksList',
                name: 'VideoWorksList',
                component: () => import('@/views/videoGoods/WorksList'),
                meta: { title: '作品列表', hidden: true, permission: ['videoGoodsWorkList'] }
              },
              {
                path: '/videoGoods/userList',
                name: 'VideoUserList',
                component: () => import('@/views/videoGoods/UserList'),
                meta: { title: '作者列表', hidden: true, permission: ['videoGoodsAuthorList'] }
              },
              {
                path: '/videoGoods/userPriceList',
                name: 'videShareList',
                component: () => import('@/views/videoGoods/UserPriceList'),
                meta: { title: '短视频佣金列表', hidden: true, permission: ['videoGoodsShareList'] }
              },
              {
                path: '/videoGoods/feedback',
                name: 'VideoFeedback',
                component: () => import('@/views/videoGoods/Feedback'),
                meta: { title: '举报列表', hidden: true, permission: ['videoGoodsFeedbackList'] }
              },
              {
                path: '/videoGoods/VideoGood',
                name: 'VideoGood',
                component: () => import('@/views/videoGoods/VideoGoods'),
                meta: { title: '带货商品', hidden: true, permission: ['videoGoodsBringGoodsList'] }
              },
              {
                path: '/videoGoods/videoClassify',
                name: 'VideoClassify',
                component: () => import('@/views/videoGoods/VideoClassify'),
                meta: { title: '短视频分类', hidden: true, permission: ['videoGoodsCatList'] }
              },
              {
                path: '/videoGoods/videoSetting',
                name: 'VideoSetting',
                component: () => import('@/views/videoGoods/Setting'),
                meta: { title: '设置', hidden: true, permission: ['videoGoodsSetting'] }
              }
            ]
          },
          // 收款码
          {
            path: '/plugins/scanCodePay',
            name: 'ScanCodePay',
            component: RouteView,
            redirect: '/plugins/scanCodePay',
            meta: { title: '收款码', permission: ['scanCodePay'] },
            children: [
              {
                path: '/plugins/scanCodePay',
                name: 'ScanCodePay',
                component: () => import('@/plugins/scanCodePay/index'),
                meta: { title: '收款码', permission: ['scanCodePay'] }
              },
              {
                path: '/plugins/scanCodePaySetting',
                name: 'ScanCodePaySetting',
                component: () => import('@/plugins/scanCodePay/settingFy'),
                meta: { title: '分拥设置', permission: ['scanCodePay'] }
              }
            ]
          },
          // 积分商城
          {
            path: '/plugins/integralStore',
            name: 'integralStore',
            component: RouteView,
            redirect: '/plugins/integralStore/Goods',
            meta: { title: '积分商城', permission: ['integralStore'] },
            children: [
              {
                path: '/plugins/integralStore/goods',
                name: 'integralStoreGoods',
                component: () => import('@/plugins/integralStore/Goods'),
                meta: { title: '积分商品', permission: ['integralStoreGoods'] }
              },
              {
                path: '/plugins/integralStore/addGoods',
                name: 'integralStoreGoodsAdd',
                hidden: true,
                component: () => import('@/plugins/integralStore/AddGoods'),
                meta: { title: '添加积分商品', permission: ['integralStoreGoods'] }
              },
              {
                path: '/plugins/integralStore/cat',
                name: 'integralStoreCat',
                component: () => import('@/plugins/integralStore/Cat'),
                meta: { title: '商品分类', permission: ['integralStoreCat'] }
              },
              {
                path: '/plugins/integralStore/setting',
                name: 'integralStoreSetting',
                component: () => import('@/plugins/integralStore/Setting'),
                meta: { title: '积分商城设置', permission: ['integralStoreSetting'] }
              },
              {
                path: '/plugins/integralStore/signIn',
                name: 'integralStoreSignin',
                component: () => import('@/plugins/integralStore/SignIn'),
                meta: { title: '签到积分设置', permission: ['integralStoreSignIn'] }
              }
            ]
          },
          // 点餐管理
          {
            path: '/plugins/food',
            name: 'Food',
            component: RouteView,
            redirect: '/plugins/food/goods',
            meta: { title: '点餐管理', permission: ['food'] },
            children: [
              {
                path: '/plugins/food/goods',
                name: 'FoodGoods',
                component: () => import('@/plugins/food/goods'),
                meta: { title: '点餐商品', permission: ['foodGoods'] }
              },
              {
                path: '/plugins/food/addGoods',
                name: 'AddOrderGoods',
                hidden: true,
                component: () => import('@/plugins/food/addGoods'),
                meta: { title: '添加商品', permission: ['foodGoods'] }
              },
              {
                path: '/plugins/food/cat',
                name: 'FoodCat',
                component: () => import('@/plugins/food/cat'),
                meta: { title: '点餐分类', permission: ['foodCat'] }
              },
              {
                path: '/plugins/food/table-number',
                name: 'FoodTableNumber',
                component: () => import('@/plugins/food/table-number'),
                meta: { title: '点餐桌号', permission: ['foodTable'] }
              },
              {
                path: '/plugins/food/setting',
                name: 'FoodSetting',
                component: () => import('@/plugins/food/setting'),
                meta: { title: '设置', permission: ['foodSetting'] }
              },
              {
                path: '/plugins/food/qrcode',
                name: 'FoodQrcode',
                component: () => import('@/plugins/food/qrcode'),
                meta: { title: '店铺点餐二维码', permission: ['foodQrcode'] }
              },
              {
                path: '/plugins/food/swiper',
                name: 'FoodSwiper',
                component: () => import('@/plugins/food/swiper'),
                meta: { title: '轮播图', permission: ['foodSlide'] }
              },
              {
                path: '/plugins/food/accessories',
                name: 'FoodAccessories',
                component: () => import('@/plugins/food/accessories'),
                meta: { title: '加料区', permission: ['foodSlide'] }
              }
            ]
          },
          // 股东分红
          {
            path: '/plugins/shareholder',
            name: 'Shareholder',
            component: RouteView,
            redirect: '/plugins/shareholder/list',
            meta: { title: '股东分红', permission: ['shareholderManage'] },
            children: [
              {
                path: '/plugins/shareholder/list',
                name: 'shareholderList',
                component: () => import('@/plugins/shareholder/ShareholderList'),
                meta: { title: '股东列表', permission: ['shareholderList'] }
              },
              {
                path: '/plugins/shareholder/teamPerformance',
                name: 'shareholderTeamPerformance',
                hidden: true,
                component: () => import('@/plugins/shareholder/TeamPerformance'),
                meta: { title: '团队业绩', permission: ['shareholderManage'] }
              },
              {
                path: '/plugins/shareholder/level',
                name: 'shareholderLevel',
                component: () => import('@/plugins/shareholder/ShareholderLevel'),
                meta: { title: '股东等级', permission: ['shareholderLevel'] }
              },
              {
                path: '/plugins/shareholder/audit',
                name: 'shareholderAudit',
                component: () => import('@/plugins/shareholder/ShareholderAudit'),
                meta: { title: '股东审核', permission: ['shareholderAudit'] }
              },
              {
                path: '/plugins/shareholder/oldlist',
                name: 'shareholderOldList',
                component: () => import('@/plugins/shareholder/ShareholderOldList'),
                meta: { title: '推荐关系', permission: ['shareholderList'] }
              },
              // {
              //   path: '/plugins/shareholder/chainlist',
              //   name: 'shareholderChainList',
              //   component: () => import('@/plugins/shareholder/ShareholderChainList'),
              //   meta: { title: '链动推荐关系', permission: ['shareholderList'] }
              // },
              {
                path: '/plugins/shareholder/shareOrder',
                name: 'shareholderShareOrder',
                component: () => import('@/plugins/shareholder/ShareholderShareOrder'),
                meta: { title: '分润订单', permission: ['shareholderShareOrder'] }
              },
              {
                path: '/plugins/shareholder/commissionList',
                name: 'shareholderCommissionList',
                component: () => import('@/plugins/shareholder/ShareholderCommissionList'),
                meta: { title: '佣金列表', permission: ['shareholderCommissionList'] }
              },
              {
                path: '/plugins/shareholder/shareCommissionList',
                name: 'shareholderShareCommissionList',
                component: () => import('@/plugins/shareholder/ShareholderShareCommissionList'),
                meta: { title: '分销佣金列表', permission: ['shareholderCommissionList'] }
              },
              {
                path: '/plugins/shareholder/withdrawAudit',
                name: 'shareholderWithdrawAudit',
                component: () => import('@/plugins/shareholder/ShareholderWithdrawAudit'),
                meta: { title: '提现审核', permission: ['shareholderWithdrawalAudit'] }
              },
              {
                path: '/plugins/shareholder/pricePool',
                name: 'shareholderPricePool',
                component: () => import('@/plugins/shareholder/ShareholderPricePool'),
                meta: { title: '股东奖金池', permission: ['shareholderPrizePool'] }
              },
              {
                path: '/plugins/shareholder/setting',
                name: 'shareholderSetting',
                component: () => import('@/plugins/shareholder/ShareholderSetting'),
                meta: { title: '设置页面', permission: ['shareholderSetting'] }
              },
              {
                path: '/plugins/shareholder/applySetting',
                name: 'shareholderApplySetting',
                component: () => import('@/plugins/shareholder/ShareholderApplySetting'),
                meta: { title: '申请设置', permission: ['shareholderApplySetting'] }
              },
              {
                path: '/plugins/shareholder/junior',
                name: 'shareholderJunior',
                hidden: true,
                component: () => import('@/plugins/shareholder/Junior'),
                meta: { title: '下级列表', permission: ['shareholderManage'] }
              },
              {
                path: '/plugins/shareholder/join',
                name: 'shareholderJoin',
                hidden: true,
                component: () => import('@/plugins/shareholder/JoinProfit'),
                meta: { title: '参与分红人数列表', permission: ['shareholderManage'] }
              },
              {
                path: '/plugins/shareholder/editLevel',
                name: 'shareholderEditLevel',
                hidden: true,
                component: () => import('@/plugins/shareholder/EditLevel'),
                meta: { title: '编辑等级', permission: ['shareholderManage'] }
              },
              {
                path: '/plugins/shareholder/bonus',
                name: 'shareholderBunus',
                hidden: true,
                component: () => import('@/plugins/shareholder/BonusMoney'),
                meta: { title: '分红奖金池金额', permission: ['shareholderManage'] }
              }
            ]
          },

          {
            path: '/plugins/Chain',
            name: 'chain',
            component: RouteView,
            redirect: '/plugins/Chain/list',
            meta: { title: '链动2+1', permission: ['shareholderChain'] },
            children: [
              {
                path: '/plugins/Chain/memberList',
                name: 'chainNumberList',
                component: () => import('@/plugins/chain/memberList'),
                meta: { title: '会员列表', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/memberAuditList',
                name: 'chainMemberAuditList',
                component: () => import('@/plugins/chain/memberAuditList'),
                meta: { title: '会员审核', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/level',
                name: 'chainLevel',
                component: () => import('@/plugins/chain/level'),
                meta: { title: '会员等级', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/editLevel',
                name: 'chainLevelEdit',
                component: () => import('@/plugins/chain/editLevel'),
                meta: { title: '会员等级', permission: ['shareholderChain'] },
                hidden: true,
              },
              {
                path: '/plugins/Chain/chainList',
                name: 'chainList',
                component: () => import('@/plugins/chain/chainList'),
                meta: { title: '推荐关系', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/shareOrder',
                name: 'chainShareOrder',
                component: () => import('@/plugins/chain/shareOrder'),
                meta: { title: '分润订单', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/commissionList',
                name: 'chainCommissionList',
                component: () => import('@/plugins/chain/commissionList'),
                meta: { title: '佣金列表', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/helpList',
                name: 'chainHelpList',
                component: () => import('@/plugins/chain/helpList'),
                meta: { title: '帮扶列表', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/setting',
                name: 'chainSetting',
                component: () => import('@/plugins/chain/setting'),
                meta: { title: '基础设置', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/levelChang',
                name: 'chainLevelChang',
                component: () => import('@/plugins/chain/levelChang'),
                meta: { title: '股东等级变动记录', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/parentChang',
                name: 'chainParentChang',
                component: () => import('@/plugins/chain/parentChang'),
                meta: { title: '股东上级变动记录', permission: ['shareholderChain'] }
              },
              {
                path: '/plugins/Chain/withdrawAudit',
                name: 'chainWithdrawAudit',
                component: () => import('@/plugins/shareholder/ShareholderWithdrawAudit'),
                meta: { title: '提现审核', permission: ['shareholderChain'] }
              },
            ]
          },

          // 新人专享
          {
            path: '/newActivity',
            name: 'newActivity',
            redirect: '/newActivity/list',
            component: RouteView,
            meta: { title: '新人专享', icon: 'profile', permission: ['ActivityNewUser'] },
            children: [
              {
                path: '/newActivity/list',
                name: 'newActivityList',
                component: () => import('@/views/marketing/newActivity/list'),
                meta: { permission: ['ActivityNewUser'], title: '活动列表' }
              },
              {
                path: '/newActivity/Edit',
                name: 'newActivityEdit',
                component: () => import('@/views/marketing/newActivity/edit'),
                meta: { permission: ['ActivityNewUser'], title: '活动详情' },
                hidden: true,
              },
              {
                path: '/newActivity/goods',
                name: 'newActivityGoods',
                component: () => import('@/views/marketing/newActivity/goods'),
                meta: { permission: ['ActivityNewUser'], title: '推荐商品' }
              },
              {
                path: '/newActivity/settings',
                name: 'newActivitySettings',
                component: () => import('@/views/marketing/newActivity/settings'),
                meta: { permission: ['ActivityNewUser'], title: '活动设置' }
              },
            ]
          },
                  // 消费返利
                  {
                    path: '/saleRebate',
                    name: 'saleRebate',
                    redirect: '/saleRebate/list',
                    component: RouteView,
                    meta: { title: '消费返利', icon: 'profile', permission: ['saleRebate'] },
                    children: [
                      {
                        path: '/saleRebate/list',
                        name: 'saleRebateList',
                        component: () => import('@/views/marketing/saleRebate/list'),
                        meta: { permission: ['saleRebate'], title: '活动列表' }
                      },
                      {
                        path: '/saleRebate/Edit',
                        name: 'saleRebateEdit',
                        component: () => import('@/views/marketing/saleRebate/edit'),
                        meta: { permission: ['saleRebate'], title: '活动详情' },
                        hidden: true,
                      },
                      {
                        path: '/newActivity/settings',
                        name: 'newActivitySettings',
                        component: () => import('@/views/marketing/saleRebate/settings'),
                        meta: { permission: ['saleRebate'], title: '活动设置' }
                      },
                    ]
                  },
           // 新人专享
           {
            path: '/serviceHome',
            name: 'serviceHome',
            redirect: '/serviceHome/goodsList',
            component: RouteView,
            meta: { title: '上门服务', icon: 'profile', permission: ['serviceHome'] },
            children: [
              {
                path: '/serviceHome/orderList',
                component: () => import('@/views/marketing/serviceHome/order/list'),
                name: 'serviceHomeOrderList',
                meta: { title: '订单列表', permission: ['serviceHome'] }
              },
              {
                path: '/serviceHome/orderComment',
                component: () => import('@/views/marketing/serviceHome/order/comment'),
                name: 'serviceHomeOrderComment',
                meta: { title: '订单评价', permission: ['serviceHome'] }
              },
              {
                path: '/serviceHome/serviceCat',
                name: 'serviceHomeServiceCat',
                component: () => import('@/views/marketing/serviceHome/serviceCat'),
                meta: { permission: ['serviceHome'], title: '商品分类' }
              },
              {
                path: '/serviceHome/goodsList',
                component: () => import('@/views/marketing/serviceHome/goods/list'),
                name: 'serviceHomeGoodsList',
                meta: { title: '商品列表', permission: ['serviceHome'] }
              },
              {
                path: '/serviceHome/goodsEdit',
                component: () => import('@/views/marketing/serviceHome/goods/edit'),
                name: 'serviceHomeGoodsEdit',
                meta: { title: '商品编辑', permission: ['serviceHome'] },
                hidden : true
              },
              {
                path: '/serviceHome/category',
                name: 'serviceHomeCategory',
                component: () => import('@/views/marketing/serviceHome/category'),
                meta: { permission: ['serviceHome'], title: '服务分类' }
              },
              {
                path: '/serviceHome/service',
                name: 'serviceHomeService',
                component: () => import('@/views/marketing/serviceHome/service'),
                meta: { permission: ['serviceHome'], title: '服务人员' }
              },
              {
                path: '/serviceHome/level',
                name: 'serviceHomeLevel',
                component: () => import('@/views/marketing/serviceHome/level'),
                meta: { permission: ['serviceHome'], title: '服务等级' }
              },
              {
                path: '/serviceHome/apply',
                name: 'serviceHomeApply',
                component: () => import('@/views/marketing/serviceHome/apply'),
                meta: { permission: ['serviceHome'], title: '入驻审核' }
              },
              {
                path: '/serviceHome/commissionDetails',
                component: () => import('@/views/marketing/serviceHome/commissionDetails'),
                name: 'serviceHomeCommissionDetails',
                meta: { title: '服务佣金', permission: ['serviceHome'] }
              },
              {
                path: '/serviceHome/withdrawList',
                component: () => import('@/views/marketing/serviceHome/withdrawList'),
                name: 'serviceHomeWithdrawList',
                meta: { title: '提现审核', permission: ['serviceHome'] }
              },
              
              {
                path: '/serviceHome/setting',
                component: () => import('@/views/marketing/serviceHome/setting'),
                name: 'serviceHomeSetting',
                meta: { title: '功能设置', permission: ['serviceHome'] }
              },
            ]
          },
          // 以图搜素
          {
            path: '/goods/imageSearchGoods/setting',
            name: 'ImageSearchGoods',
            component: RouteView,
            redirect: '/goods/imageSearchGoods/setting',
            meta: {
              title: '以图搜图',
              permission: ['imageSearchGoods']
            },
            children: [
              {
                path: '/goods/imageSearchGoods/setting',
                name: 'ImageSearchGoods',
                component: () => import('@/views/goods/imageSearchGoods/setting'),
                meta: {
                  title: '配置项',
                  permission: ['imageSearchGoods']
                },
              },
              {
                path: '/goods/intelligent-match/Tencent',
                name: 'IntelligentMatchIndexTencent',
                component: () => import('@/views/goods/intelligent-match/Tencent'),
                meta: {
                  title: '腾讯云配置',
                  permission: ['imageSearchGoods']
                }
              },
            ]
          },
          // 在线搭配
          {
            path: '/goods/intelligent-match/List',
            name: 'IntelligentMatchIndex',
            component: RouteView,
            redirect: '/goods/intelligent-match/List',
            meta: {
              title: '在线搭配',
              permission: ['intelligentMatchScene']
            },
            children: [
              {
                path: '/goods/intelligent-match/List',
                name: 'IntelligentMatchList',
                component: () => import('@/views/goods/intelligent-match/List'),
                meta: {
                  title: '场景分类列表',
                  permission: ['intelligentMatchScene']
                }
              },
              {
                path: '/goods/intelligent-match/Index',
                name: 'IntelligentMatchIndex',
                component: () => import('@/views/goods/intelligent-match/Index'),
                meta: {
                  title: '场景列表',
                  permission: ['intelligentMatchScene']
                }
              },
            ]
          },
          // 微信会员卡
          {
            path: '/WeChatVip',
            name: 'weChatVipCardEdit',
            redirect: '/WeChatVipCard/edit',
            component: RouteView,
            meta: { title: '微信会员卡', icon: 'profile', permission: ['weChatVipCard'] },
            children: [
              {
                path: '/WeChatVipCard/edit',
                name: 'weChatVipCardEdit',
                component: () => import('@/views/WeChatVipCard/Edit'),
                meta: { permission: ['weChatVipCard'], title: '会员卡信息' }
              },
              {
                path: '/WeChatVipCard/cardBindList',
                name: 'weChatVipCardBindList',
                component: () => import('@/views/WeChatVipCard/BindList'),
                meta: { permission: ['weChatVipCard'], title: '绑卡记录' }
              }
              // hidden: true,
            ]
          },
          // 支付宝会员卡
          // {
          //   path: '/marketing/alipayPromotion/vipCardList',
          //   name: 'vipCardList',
          //   component: () => import('@/views/marketing/alipayPromotion/vipCardList'),
          //   meta: {
          //     title: '支付宝会员卡',
          //     permission: ['alipayPromotion']
          //   }
          // },
          // 支付宝数字经营
          {
            path: '/marketing/alipayPromotion',
            name: 'alipayPromotion',
            component: RouteView,
            redirect: '/marketing/alipayPromotion/serviceList',
            meta: {
              title: '支付宝数字经营',
              icon: 'gold',
              permission: ['alipayPromotion']
            },
            children: [{
              path: '/marketing/alipayPromotion/serviceList',
              name: 'serviceList',
              component: () => import('@/views/marketing/alipayPromotion/serviceList'),
              meta: {
                title: '服务提报',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/serviceEdit',
              name: 'serviceEdit',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/serviceEdit'),
              meta: {
                title: '服务提报详情',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/searchKeywords',
              name: 'searchKeywords',
              component: () => import('@/views/marketing/alipayPromotion/searchKeywords'),
              meta: {
                title: '搜索关键字',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/searchKeywordsEdit',
              name: 'searchKeywordsEdit',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/searchKeywordsEdit'),
              meta: {
                title: '关键字搜索详情',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/listMarketingMaterial',
              name: 'listMarketingMaterial',
              component: () => import('@/views/marketing/alipayPromotion/listMarketingMaterial'),
              meta: {
                title: '素材列表',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/marketingMaterialEdit',
              name: 'marketingMaterialEdit',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/marketingMaterialEdit'),
              meta: {
                title: '新增素材',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/promotionPlan',
              name: 'promotionPlan',
              component: () => import('@/views/marketing/alipayPromotion/promotionPlan'),
              meta: {
                title: '推广计划',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/promotionPlanEdit',
              name: 'promotionPlanEdit',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/promotionPlanEdit'),
              meta: {
                title: '推广计划详情',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/storeCouponList',
              name: 'storeCouponList',
              component: () => import('@/views/marketing/alipayPromotion/storeCouponList'),
              meta: {
                title: '商家券活动',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/storeCouponEdit',
              name: 'storeCouponEdit',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/storeCouponEdit'),
              meta: {
                title: '新增商家券',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/coupoPromotionList',
              name: 'coupoPromotionList',
              component: () => import('@/views/marketing/alipayPromotion/coupoPromotionList'),
              meta: {
                title: '商家券推广',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/coupoPromotionEdit',
              name: 'coupoPromotionEdit',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/coupoPromotionEdit'),
              meta: {
                title: '商家券推广新增',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/wifi',
              name: 'wifi',
              component: () => import('@/views/marketing/alipayPromotion/wifi'),
              meta: {
                title: 'WIFI',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/voucherList',
              name: 'voucherList',
              component: () => import('@/views/marketing/alipayPromotion/voucherList'),
              meta: {
                title: '支付券活动',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/voucherAdd',
              name: 'voucherAdd',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/voucherAdd'),
              meta: {
                title: '新增支付券',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/voucherEdit',
              name: 'voucherEdit',
              hidden: true,
              component: () => import('@/views/marketing/alipayPromotion/voucherEdit'),
              meta: {
                title: '编辑支付券',
                permission: ['alipayPromotion']
              }
            }, {
              path: '/marketing/alipayPromotion/vipCardEdit',
              name: 'vipCardEdit',
              component: () => import('@/views/marketing/alipayPromotion/vipCardEdit'),
              hidden: true,
              meta: {
                title: '会员卡设置',
                permission: ['alipayPromotion']
              }
            }],
          },
          // 农产认养
          {
            path: '/plugins/adopt',
            name: 'adopt',
            component: RouteView,
            redirect: '/plugins/adopt/List',
            meta: {
              title: '果树认养',
              permission: ['adopt']
            },
            children: [
              {
                path: '/plugins/adopt/List',
                name: 'AdoptList',
                component: () => import('@/plugins/adopt/List'),
                meta: {
                  title: '认养列表',
                  permission: ['adoptList']
                }
              },
              {
                path: '/plugins/adopt/Edit',
                name: 'AdoptEdit',
                hidden: true,
                component: () => import('@/plugins/adopt/Edit'),
                meta: {
                  title: '认养编辑',
                  keepAlive: false,
                  permission: ['adoptList']
                }
              },
              {
                path: '/plugins/adopt/Add',
                name: 'AdoptAdd',
                hidden: true,
                component: () => import('@/plugins/adopt/Edit'),
                meta: {
                  title: '添加认养',
                  keepAlive: false,
                  permission: ['adoptList']
                }
              },
              {
                path: '/plugins/adopt/adopt-cat',
                name: 'AdoptCat',
                component: () => import('@/plugins/adopt/AdoptCat'),
                meta: { title: '认养分类', permission: ['adoptCat'] }
              },
              {
                path: '/plugins/adopt/order-list',
                name: 'AdoptOrderList',
                component: () => import('@/plugins/adopt/OrderList'),
                meta: { title: '认养订单', permission: ['adoptOrder'] }
              },
              {
                path: '/plugins/adopt/setting',
                name: 'AdoptSetting',
                component: () => import('@/plugins/adopt/Setting'),
                meta: { title: '认养设置', permission: ['adoptSetting'] }
              },
              {
                path: '/plugins/adopt/device-list',
                name: 'DeviceList',
                component: () => import('@/plugins/adopt/DeviceList'),
                meta: { title: '设备管理', permission: ['adoptDeviceManagement'] }
              },
              {
                path: '/plugins/adopt/cost-order-list',
                name: 'CostOrderList',
                component: () => import('@/plugins/adopt/CostOrderList'),
                meta: { title: '配送订单', permission: ['adoptDeliveryOrder'] }
              },
              {
                path: '/plugins/adopt/cost-order-details',
                name: 'CostOrderDetails',
                hidden: true,
                component: () => import('@/plugins/adopt/CostOrderDetails'),
                meta: { title: '订单详情', keepAlive: false, permission: ['adoptOrder'] }
              },
              {
                path: '/plugins/adopt/order-details',
                name: 'AdoptOrderDetails',
                hidden: true,
                component: () => import('@/plugins/adopt/OrderDetails'),
                meta: {
                  title: '认养详情',
                  keepAlive: false,
                  permission: ['adoptOrder']
                }
              }
            ]
          },
          // 产品溯源
          {
            path: '/plugins/productTraceability',
            name: 'productTraceability',
            component: RouteView,
            redirect: '/plugins/productTraceability/productList',
            meta: {
              title: '产品溯源',
              permission: ['productTraceability']
            },
            children: [
              {
                path: '/plugins/productTraceability/productList',
                name: 'ProductList',
                component: () => import('@/plugins/productTraceability/productList'),
                meta: { title: '产品列表', hidden: true, permission: ['productTraceabilityList'] }
              },
              {
                path: '/plugins/productTraceability/productBatchList',
                name: 'ProductBatchList',
                component: () => import('@/plugins/productTraceability/productBatchList'),
                meta: { title: '产品批次', hidden: true, permission: ['productTraceabilityBatch'] }
              },
              {
                path: '/plugins/productTraceability/productBatchProcessList',
                name: 'ProductBatchProcessList',
                hidden: true,
                component: () => import('@/plugins/productTraceability/productBatchProcessList'),
                meta: { title: '批次流程', hidden: true, permission: ['productTraceabilityBatch'] }
              },
              {
                path: '/plugins/productTraceability/productBatchProcessLogList',
                name: 'ProductBatchProcessLogList',
                component: () => import('@/plugins/productTraceability/productBatchProcessLogList'),
                meta: { title: '溯源记录', hidden: true, permission: ['productTraceabilityLog'] }
              }
            ]
          },
          // 在线收银台
          {
            path: host + '/cashier/#/index',
            name: 'cashier',
            meta: {
              title: '在线收银台',
              icon: 'tablet',
              target: '_blank',
              permission: ['cashier']
            },
            children: []
          },
          // 同城配送
          {
            path: '/setting/delivery',
            redirect: '/setting/delivery',
            name: 'Delivery',
            component: RouteView,
            meta: {
              title: '同城配送',
              permission: ['cityDelivery']
            },
            // component: () => import('@/views/setting/Delivery')
            children: [{
              path: '/setting/delivery',
              name: 'Delivery',
              component: () => import('@/views/setting/Delivery'),
              meta: {
                title: '微信配送设置',
                permission: ['delivery']
              }
            }, {
              path: '/setting/alipayDelivery',
              name: 'alipayDelivery',
              component: () => import('@/views/setting/alipayDelivery'),
              meta: {
                title: '支付宝配送设置',
                permission: ['delivery']
              }
            }]
          },
          // 联盟券
          {
            path: '/saasAllianceCoupon',
            name: 'saasAllianceCoupon',
            redirect: '/saasAllianceCoupon',
            meta: { title: '联盟券', icon: 'profile', permission: ['saasAllianceCoupon'], },
            component: RouteView,
            children: [
              {
                path: '/saasAllianceCoupon',
                name: 'saasAllianceCoupon',
                component: () => import('@/views/marketing/saasAllianceCoupon/list'),
                meta: { permission: ['saasAllianceCoupon'], title: '商品列表' }
              },
              {
                path: '/saasAllianceCouponSetting',
                name: 'saasAllianceCouponSetting',
                component: () => import('@/views/marketing/saasAllianceCoupon/setting'),
                meta: { permission: ['saasAllianceCoupon'], title: '当面付比例设置' }
              }
            ]
          },
          ...chartGpt,
        ]
      },
      // 平台分红管理 分红池
      {
        path: '/ ',
        name: 'plat',
        component: RouteView,
        redirect: '/plat/poolTotal',
        meta: { title: '平台', icon: 'safety', permission: ['plat'] },
        children: [
          {
            path: '/plat/poolTotal',
            name: 'poolTotal',
            hidden: false,
            component: () => import('@/views/plat/poolTotal'),
            meta: { title: '分红总池', permission: ['poolTotal'] },
          },
          {
            path: '/plat/poolChild',
            name: 'poolChild',
            hidden: false,
            component: () => import('@/views/plat/poolChild'),
            meta: { title: '分池列表', permission: ['poolChild'] },
          },
          {
            path: '/plat/poolLog',
            name: 'poolLog',
            hidden: false,
            component: () => import('@/views/plat/poolLog'),
            meta: { title: '分红明细', permission: ['poolLog'] },
          },
          {
            path: '/plat/poolSetting',
            name: 'poolSetting',
            hidden: false,
            component: () => import('@/views/plat/setting'),
            meta: { title: '分红池设置', permission: ['poolSetting'] },
          },
        ],
      },
      // 区域代理
      {
        path: '/ ',
        name: 'area',
        component: RouteView,
        redirect: '/area/areaAgentList',
        meta: { title: '区域', icon: 'profile', permission: ['area'] },
        children: [
          {
            path: '/area/areaAgentList',
            name: 'areaAgentList',
            hidden: false,
            component: () => import('@/views/area/areaAgentList'),
            meta: { title: '代理列表', permission: ['areaAgentList'] },
          },
          {
            path: '/area/areaBonus',
            name: 'areaBonus',
            hidden: false,
            component: () => import('@/views/area/areaBonus'),
            meta: { title: '分红明细', permission: ['areaBonus'] },
          },
          {
            path: '/area/areaIntegralSend',
            name: 'areaIntegralSend',
            hidden: false,
            component: () => import('@/views/area/areaIntegralSend'),
            meta: { title: '积分释放', permission: ['areaIntegralSend'] },
          },
          {
            path: '/area/areaPrize',
            name: 'areaPrize',
            hidden: false,
            component: () => import('@/views/area/areaPrize'),
            meta: { title: '区域业绩', permission: ['areaPrize'] },
          },
          {
            path: '/area/areaSharePrize',
            name: 'areaSharePrize',
            hidden: false,
            component: () => import('@/views/area/areaSharePrize'),
            meta: { title: '推荐奖励', permission: ['areaSharePrize'] },
          },
          {
            path: '/area/areaLevelSet',
            name: 'areaLevelSet',
            hidden: false,
            component: () => import('@/views/area/areaLevelSet'),
            meta: { title: '区域设置', permission: ['areaLevelSet'] },
          },
        ],
      },      
            // 预约绑卡
            {
              path: '/  ',
              name: 'SubscribeMeal',
              component: RouteView,
              redirect: '/subscribeMeal/Commission',
              meta: { title: '预约', icon: 'profile', permission: ['subscribeMeal'] },
              children: [
                {
                  path: '/subscribeMeal/addressList',
                  name: 'subscribeAddressList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/addressList'),
                  meta: { title: '地址映射', permission: ['subscribeAddressList'] }
                },
                {
                  path: '/subscribeMeal/List',
                  name: 'subscribeList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/list'),
                  meta: { title: '预约列表', permission: ['subscribeMeal1'] }
                },
                {
                  path: '/subscribeMeal/cardList',
                  name: 'CardList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/cardList'),
                  meta: { title: '卡包列表', permission: ['subscribeMeal2'] }
                },
                {
                  path: '/subscribeMeal/rechargeList',
                  name: 'RechargeList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/rechargeList'),
                  meta: { title: '充值列表', permission: ['subscribeMeal3'] }
                },
                {
                  path: '/subscribeMeal/rechargeSetting',
                  name: 'RechargeSetting',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/rechargeSetting'),
                  meta: { title: '面额管理', permission: ['subscribeMeal4'] }
                },
                {
                  path: '/subscribeMeal/telephoneInfo',
                  name: 'TelephoneInfo',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/telephoneInfo'),
                  meta: { title: '话费明细', permission: ['subscribeMeal5'] }
                },
                {
                  path: '/subscribeMeal/activeList',
                  name: 'ActiveList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/activeList'),
                  meta: { title: '活跃记录', permission: ['subscribeMeal6'] }
                },
                {
                  path: '/subscribeMeal/teamAwardList',
                  name: 'TeamAwardList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/teamAwardList'),
                  meta: { title: '团队明细', permission: ['subscribeMeal7'] }
                },
                {
                  path: '/subscribeMeal/selfAwardList',
                  name: 'SelfAwardList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/selfAwardList'),
                  meta: { title: '个人明细', permission: ['subscribeMeal8'] }
                },
                {
                  path: '/subscribeMeal/integralList',
                  name: 'IntegralList',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/integralList'),
                  meta: { title: '释放记录', permission: ['subscribeMeal9'] }
                },
                {
                  path: '/subscribeMeal/mealSetting',
                  name: 'mealSetting',
                  hidden: false,
                  component: () => import('@/views/subscribeMeal/setting'),
                  meta: { title: '设置', permission: ['subscribeMeal10'] }
                },

              ]
            },
			// 广告设置
			{
			  path: '/',
			  name: 'ad',
			  component: RouteView,
			  redirect: '/Ad/Commission',
			  meta: { title: '广告设置', icon: 'profile', permission: ['ad'] },
			  children: [
			    {
			      path: '/ad/overview/overview',
			      name: 'overview',
			      hidden: false,
			      component: () => import('@/views/ad/overview/overview'),
			      meta: { title: '广告概况', permission: ['overview'] }
			    },
			    {
			      path: '/ad/goldCoinDetails/goldCoinDetails',
			      name: 'goldCoinDetails',
			      hidden: false,
			      component: () => import('@/views/ad/goldCoinDetails/goldCoinDetails'),
			      meta: { title: '金币明细', permission: ['goldCoinDetails'] }
			    },
          {
			      path: '/ad/moneyDetail/moneyDetail',
			      name: 'moneyDetail',
			      hidden: false,
			      component: () => import('@/views/ad/moneyDetail/moneyDetail'),
			      meta: { title: '兑换明细', permission: ['goldCoinDetails'] }
			    },
          {
			      path: '/ad/adLevel/adLevel',
			      name: 'adLevel',
			      hidden: false,
			      component: () => import('@/views/ad/adLevel/adLevel'),
			      meta: { title: '分润等级', permission: ['goldCoinDetails'] }
			    },
          {
			      path: '/ad/advertisingSettings/advertisingSettings',
			      name: 'advertisingSettings',
			      hidden: false,
			      component: () => import('@/views/ad/advertisingSettings/advertisingSettings'),
			      meta: { title: '广告设置', permission: ['goldCoinDetails'] }
			    },
			  ]
			},
      // 设置
      {
        path: '/config',
        name: 'Config',
        component: RouteView,
        redirect: '/setting/systemSetting',
        meta: { title: '设置', icon: 'setting', permission: ['config'] },
        children: [
          {
            path: '/setting/paySetting',
            name: 'PaySetting',
            component: RouteView,
            redirect: '/setting/adapay',
            meta: { title: '支付配置', icon: 'safety', permission: ['payConfig'] },
            children: [
              // {
              //   path: '/setting/wechat',
              //   name: 'WechatConfig',
              //   component: () => import('@/views/setting/WechatConfig'),
              //   meta: {
              //     title: '微信配置',
              //     permission: ['wechatConfig'],
              //     type:0,
              //     hasChannel:false
              //   }
              // },
              // {
              //   path: '/setting/alipay',
              //   name: 'AlipayConfig',
              //   component: () => import('@/views/setting/AlipayConfig'),
              //   meta: {
              //     title: '支付宝配置',
              //     permission: ['alipayConfig']
              //   }
              // },
              // {
              //   path: '/setting/alipayCertificate',
              //   name: 'AlipayCertificateConfig',
              //   component: () => import('@/views/setting/AlipayCertificateConfig'),
              //   meta: {
              //     title: '支付宝证书配置',
              //     permission: ['alipayConfig']
              //   }
              // },
              {
                path: '/setting/adapay',
                name: 'settingAdapay',
                component: () => import('@/views/setting/adapay'),
                meta: {
                  title: 'adapay配置',
                  // permission: ['adapay']
                }
              },
              {
                path: '/setting/adapayBankCard',
                name: 'settingAdapayBankCard',
                component: () => import('@/views/setting/adapayBankCard'),
                meta: {
                  title: '银行卡分账配置',
                  // permission: ['adapay']
                }
              }
            ]
          },
          {
            path: '/setting/other',
            name: 'SettingOther',
            meta: {
              title: '联盟店铺',
              permission: ['unionShopSetting']
            },
            component: () => import('@/views/setting/Other')
          },
          {
            path: '/setting/basicSetting',
            name: 'BasicSetting',
            component: RouteView,
            redirect: '/setting/douyin',
            meta: { title: '基础设置', icon: 'safety', permission: ['baseConfig'] },
            children: [
              {
                path: '/setting/douyin',
                name: 'DouYinConfig',
                component: () => import('@/views/setting/DouYinConfig'),
                meta: {
                  title: '抖音配置',
                  permission: ['douyinConfig']
                }
              },
              {
                path: '/setting/upload',
                name: 'UploadConfig',
                component: () => import('@/views/setting/Upload'),
                meta: {
                  title: '上传配置',
                  permission: ['uploadConfig']
                }
              },
              {
                path: '/setting/runover',
                name: 'RunOverConfig',
                component: () => import('@/views/setting/RunOver'),
                meta: {
                  title: '越限配置',
                  permission: ['runOverConfig']
                }
              },
              {
                path: '/setting/copyright',
                name: 'SettingCopyright',
                meta: {
                  title: '版权设置',
                  permission: ['SettingCopyright']
                },
                component: () => import('@/views/setting/CopyrightConfig')
              },
              {
                path: '/setting/kefu',
                name: 'SettingKefu',
                meta: {
                  title: '客服设置',
                  permission: ['SettingStoreKefu']
                },
                component: () => import('@/views/setting/KefuConfig')
              }
            ]
          },
          {
            path: '/setting/app',
            name: 'SettingApp',
            meta: {
              title: 'APP设置',
              permission: ['appSetting']
            },
            component: () => import('@/views/setting/AppConfig')
          },
          {
            path: '/setting/ocr',
            name: 'SettingOcr',
            meta: {
              title: 'OCR配置',
              permission: ['ocrSetting']
            },
            component: () => import('@/views/setting/OcrConfig')
          },
          {
            path: '/setting/voiceBroadcast',
            name: 'SettingVoiceBroadcast',
            meta: {
              title: '收款播报设置',
              permission: ['SettingVoiceBroadcast']
            },
            component: () => import('@/views/setting/VoiceBroadcast')
          },
          // {
          //   path: '/setting/upload-wechat',
          //   name: 'UploadWechat',
          //   component: () => import('@/views/setting/UploadWechat'),
          //   meta: { title: '小程序发布', icon: 'wechat', permission: ['uploadWechat'] }
          // },
          // {
          //   path: '/setting/appletManagement',
          //   name: 'AppletManagement',
          //   component: RouteView,
          //   meta: {
          //     title: '小程序管理',
          //     permission: ['appletManagement']
          //   },
          //   redirect: '/setting/appletManagement/wechat',
          //   children: [
          //     {
          //       path: '/setting/appletManagement/wechat',
          //       name: 'wechatAppletManagement',
          //       component: () => import('@/views/setting/AppletManagement'),
          //       meta: { title: '微信小程序', permission: ['appletManagementWechat'] }
          //     },
          //     {
          //       path: '/setting/appletManagement/alipay',
          //       name: 'alipayAppletManagement',
          //       component: () => import('@/views/setting/AlipayApplet'),
          //       meta: { title: '支付宝小程序', permission: ['appletManagementAlipay'] }
          //     },
          //     {
          //       path: '/setting/appletManagement/bandMini',
          //       name: 'appletManagementBind',
          //       hidden: true,
          //       meta: {
          //         title: '绑定小程序',
          //         permission: ['appletManagementBand']
          //       },
          //       component: () => import('@/views/setting/BandMini')
          //     },
          //     {
          //       path: '/setting/appletManagement/chooseType',
          //       name: 'appletManagementChooseType',
          //       hidden: true,
          //       meta: {
          //         title: '新建小程序',
          //         permission: ['appletManagement']
          //       },
          //       component: () => import('@/views/setting/ChooseType')
          //     },
          //     {
          //       path: '/setting/appletManagement/writeInformation',
          //       name: 'appletManagementWriteInformation',
          //       hidden: true,
          //       meta: {
          //         title: '填写资料',
          //         permission: ['appletManagement']
          //       },
          //       component: () => import('@/views/setting/WriteInformation')
          //     },
          //     {
          //       path: '/setting/appletManagement/writeInformationAlipay',
          //       name: 'appletManagementWriteInformationAlipay',
          //       hidden: true,
          //       meta: {
          //         title: '小程序详情',
          //         permission: ['appletManagement']
          //       },
          //       component: () => import('@/views/setting/writeInformationAlipay/index')
          //     },
          //     {
          //       path: '/setting/appletManagement/completeInformation',
          //       name: 'appletManagementCompleteInformation',
          //       hidden: true,
          //       meta: {
          //         title: '完善小程序',
          //         permission: ['appletManagementWechat']
          //       },
          //       component: () => import('@/views/setting/CompleteInformation')
          //     }
          //   ]
          // },
          // {
          //   path: '/setting/merchantIncomingParts',
          //   name: 'merchantIncomingPartsList',
          //   component: RouteView,
          //   meta: {
          //     title: '支付进件',
          //     permission: ['payIncoming']
          //   },
          //   redirect: 'setting/merchantIncomingParts/wechat',
          //   children: [
          //     {
          //       path: '/setting/merchantIncomingParts/wechat',
          //       name: 'merchantIncomingPartsWechat',
          //       meta: {
          //         title: '微信',
          //         permission: ['payIncomingWechat']
          //       },
          //       component: () => import('@/views/setting/merchantIncomingParts/wechat')
          //     },
          //     {
          //       path: '/setting/merchantIncomingParts/edit',
          //       name: 'merchantIncomingPartsEdit',
          //       meta: {
          //         title: '编辑新增',
          //         permission: ['payIncomingWechat']
          //       },
          //       hidden: true,
          //       component: () => import('@/views/setting/merchantIncomingParts/edit')
          //     }
          //   ]
          // },
          {
            path: '/setting/wechat',
            name: 'WechatConfigLock',
            component: () => import('@/views/setting/WechatLock'),
            meta: { title: '微信配置', icon: 'wechat', permission: ['wechatConfigLock'] }
          },
          {
            path: '/setting/alipay',
            name: 'AlipayConfigLock',
            component: () => import('@/views/setting/AlipayLock'),
            meta: { title: '支付宝配置', icon: 'wechat', permission: ['alipayConfigLock'] }
          },
          {
            path: '/setting/app',
            name: 'AppConfigLock',
            component: () => import('@/views/setting/AppLock'),
            meta: { title: '支付宝App配置', icon: 'wechat', permission: ['appConfigLock'] }
          },
          {
            path: '/setting/join-alliance',
            name: 'JoinAlliance',
            component: () => import('@/views/setting/JoinAlliance'),
            meta: { title: '加入联盟', icon: 'cloud', permission: ['joinAlliance'] }
          },
          {
            path: '/saas/upgrade',
            name: 'saasUpgrade',
            component: () => import('@/views/setting/Update'),
            meta: { title: '系统升级', keepAlive: false, permission: ['storeUpgrade'] }
          },
          {
            path: '/saas/kefu',
            name: 'saasKefu',
            component: () => import('@/views/setting/KefuConfig'),
            meta: { title: '客服设置', keepAlive: false, permission: ['kefuSetting'] }
          },
          {
            path: '/setting/timerTaskCopy',
            name: 'timerTaskCopy',
            component: () => import('@/views/setting/timerTaskCopy'),
            meta: { title: '定时任务', permission: ['timerTaskCopy'] }
          }
        ]
      },
      // 财务
      {
        path: '/SingleFinance',
        name: 'singleFinance',
        component: RouteView,
        redirect: '/singleFinance/detailed',
        meta: { title: '财务', icon: 'setting', permission: ['storeProfit'] },
        children: [
          {
            path: '/singleFinance/detailed',
            name: 'financeDetailed',
            component: () => import('@/views/singleFinance/detailed'),
            meta: { title: '账户明细', icon: 'safety', permission: ['storeAccount'] },
          },
          {
            path: '/singleFinance/withdrawal',
            name: 'financeWithdrawal',
            component: () => import('@/views/singleFinance/withdrawal'),
            meta: { title: '账户提现', icon: 'safety', permission: ['storeCash'] },
          },
          {
            path: '/profit/record',
            name: 'ProfitSharingRecord',
            component: () => import('@/views/profit/Record'),
            meta: { title: '分账记录', permission: ['profitSharingRecord'] }
          },
          {
            path: '/profit/financialList',
            name: 'financialList',
            component: () => import('@/views/profit/financialList'),
            meta: { title: '财务列表', permission: ['financialList'] }
          },
        ]
      },
      // saas管理
      {
        path: '/saas/store',
        component: RouteView,
        name: 'saas_store',
        redirect: '/saas/store/list',
        meta: { title: '店铺', icon: 'shop', permission: ['saasStore'] },
        children: [
          {
            path: '/saas/store/list',
            name: 'SaasStoreList',
            component: () => import('@/views/saas/StoreList'),
            meta: { title: '店铺列表', keepAlive: false, permission: ['saasStoreList'] }
          },
          {
            path: '/saas/category',
            name: 'saasCategory',
            component: () => import('@/views/saas/Category'),
            meta: { title: '店铺分类', keepAlive: false, permission: ['saasStoreCategory'] }
          },
          {
            path: '/saas/store/setting',
            name: 'SaasStoreSetting',
            component: () => import('@/views/saas/StoreSetting'),
            hidden: true,
            meta: { title: '店铺设置', keepAlive: false, permission: ['saasStoreSetting'] }
          },
          {
            path: '/saas/store/apply',
            name: 'saasStoreApply',
            // component: RouteView,
            // redirect: '/saas/store/applyList',
            component: () => import('@/views/saas/ApplyList'),
            meta: { title: '店铺申请', keepAlive: false, permission: ['saasStoreApply'] },
          },
          // {
          //   path: '/saas/SassStoreSetting',
          //   name: 'SassStoreSetting',
          //   component: () => import('@/views/saas/SassStoreSetting'),
          //   meta: { title: '店铺设置', keepAlive: false, permission: ['saasStoreList'] }
          // },
          {
            path: '/saas/agency/storeRenew',
            name: 'SaasAgencyStoreRenew',
            component: RouteView,
            redirect: '/saas/agency/storeRenew',
            meta: { title: '店铺缴费', keepAlive: false, permission: ['saasAgencyStoreRenew'] },
            children: [
              {
                path: '/saas/agency/storeRenew',
                name: 'SaasAgencyStoreRenew',
                component: () => import('@/views/saas/StoreRenew'),
                meta: { permission: ['saasAgencyStoreRenew'], title: '缴费列表' }
              },
              {
                path: '/saas/store/applySetting',
                name: 'saasStoreApplySetting',
                component: () => import('@/views/saas/ApplySetting'),
                meta: { permission: ['saasStoreApplyConf'], title: '缴费设置' }
              },
            ]
          },
          {
            path: '/saas/agency/moneyCode',
            name: 'saaAgencysMoneyCode',
            component: () => import('@/views/saas/MoneyCode'),
            meta: { title: '独立收款码', keepAlive: false, permission: ['saasAgencyMoneyCode'] }
          },
          {
            path: '/saas/agency/moneySaasCode',
            name: 'saasAgencysMoneyCode',
            component: () => import('@/views/saas/MoneySaasCode'),
            meta: { title: '平台收款码', keepAlive: false, permission: ['saasAgencyAllianceMoneyCode'] }
          },
          {
            path: '/saas/agency/payApply',
            name: 'SaasAgencyPay',
            component: () => import('@/views/saas/AgencyPayApply'),
            meta: { title: '进件列表', keepAlive: false, permission: ['saasAgencyPayApply'] }
          },
          {
            path: '/saas/FoodsCode',
            name: 'saasFoodsCode',
            component: () => import('@/views/saas/FoodsCode'),
            meta: { title: '点餐码配置', keepAlive: false, permission: ['saasFoodsCode'] }
          },
          {
            path: '/saas/copy',
            name: 'SaasStoreCopy',
            redirect: '/saas/copy/form',
            component: RouteView,
            meta: { title: '店铺复制', icon: 'profile', permission: ['saasStoreCopy'] },
            children: [
              {
                path: '/saas/copy/form',
                name: 'saasStoreCopyFrom',
                component: () => import('@/views/saas/copy/form'),
                meta: { permission: ['saasStoreCopy'], title: '店铺复制' }
              },
              {
                path: '/saas/copy/record',
                name: 'saasStoreCopyRecord',
                component: () => import('@/views/saas/copy/record'),
                meta: { permission: ['saasStoreCopy'], title: '复制记录' }
              },
            ]
          },
          {
            path: '/saas/store/template',
            name: 'SaasStoreTemplate',
            component: () => import('@/views/saas/template'),
            meta: { title: '店铺模版', keepAlive: false, permission: ['saasStoreTemplate'] }
          },
          {
            path: '/saas/store/storeSync',
            name: 'SaasStoreSync',
            component: RouteView,
            redirect: '/saas/store/storeSyncList',
            meta: { title: '店铺同步', keepAlive: false, permission: ['saasStoreSync'] },
            children: [
              {
                path: '/saas/store/storeSyncList',
                name: 'saasStoreSync',
                component: () => import('@/views/saas/StoreSync'),
                meta: { permission: ['saasStoreSync'], title: '店铺同步' }
              },
              {
                path: '/saas/store/storeSyncLog',
                name: 'saasStoreSyncLog',
                component: () => import('@/views/saas/StoreSyncLog'),
                meta: { permission: ['saasStoreSync'], title: '同步记录' }
              },
            ]
          },
          // {
          //   path: '/saas/alliance-check',
          //   name: 'allianceCheck',
          //   component: () => import('@/views/saas/AlliancesCheck'),
          //   meta: { title: '入驻审核', keepAlive: false, permission: ['allianceCheck'] }
          // }
        ]
      },
      // 区域
      {
        path: '/saas/agency',
        component: RouteView,
        name: 'SaasAgency',
        redirect: '/saas/agency/payApply',
        meta: { title: '区域', icon: 'solution', permission: ['saasAgency'] },
        children: [
          {
            path: '/saas/agency/list',
            name: 'SaasAgencyList',
            component: RouteView,
            redirect: '/saas/agency/list',
            meta: { title: '区域管理员', keepAlive: false, permission: ['saasAgencyList'] },
            children: [
              {
                path: '/saas/agency/list',
                name: 'SaasAgencyList',
                component: () => import('@/views/saas/AccountList'),
                meta: { title: '管理列表', keepAlive: false, permission: ['saasAgencyList'] }
              },
              {
                path: '/saas/agency/setting',
                name: 'SaasAgencySetting',
                component: () => import('@/views/saas/AgencySetting'),
                meta: { title: '佣金设置', keepAlive: false, permission: ['saasAgencySetting'] }
              },
              {
                path: '/saas/agency/commissionSetting',
                name: 'SaasAgencyCommissionSetting',
                component: () => import('@/views/saas/AgencyCommissionSetting'),
                meta: { title: '管理员中心', keepAlive: false, permission: ['saasAgencySetting'] }
              },
              {
                path: '/saas/agency/applyList',
                name: 'SaasAgencyApplyList',
                component: () => import('@/views/saas/areaAgentApply'),
                meta: { title: '管理申请', keepAlive: false, permission: ['areaAgentApply'], type: 0 }
              },
            ]
          },
          {
            path: '/saas/productAgentList',
            name: 'SaasProductAgentList',
            component: RouteView,
            redirect: '/saas/productAgentList',
            meta: { title: '产品代理', keepAlive: false, permission: ['goodsAgent'] },
            children: [
              {
                path: '/saas/productAgentList',
                name: 'SaasProductAgentList',
                component: () => import('@/views/daili/productAgent'),
                meta: { permission: ['goodsAgent'], title: '产品代理' }
              },
              {
                path: '/saas/commissionSetting',
                name: 'SaasCommissionSetting',
                component: () => import('@/views/daili/commissionSetting'),
                meta: { permission: ['goodsAgentSetting'], title: '佣金设置' }
              },
              {
                path: '/saas/productAgentList/applyList',
                name: 'SaasProductAgentApplyList',
                component: () => import('@/views/saas/areaAgentApply'),
                meta: { title: '代理申请', keepAlive: false, permission: ['goodsAgentApply'], type: 2 }
              },
            ]
          },
          {
            path: '/warehouse/StockManagement',
            name: 'StockManagement',
            // component: () => import('@/views/warehouse/stockManagement'),
            redirect: '/warehouse/StockManagement',
            component: RouteView,
            meta: { title: '仓库管理', keepAlive: false, permission: ['frontAgent'] },
            children: [
              {
                path: '/warehouse/StockManagement',
                name: 'StockManagement',
                component: () => import('@/views/warehouse/stockManagement'),
                meta: { title: '仓库管理', keepAlive: false, permission: ['frontAgent'] }
              },
              {
                path: '/warehouse/bindShopList',
                name: 'bindShopList',
                component: () => import('@/views/warehouse/bindShopList'),
                meta: { title: '绑定商家', keepAlive: false, permission: ['frontAgentBindStore'] }
              },
              {
                path: '/warehouse/bindSupplierList',
                name: 'bindSupplierList',
                component: () => import('@/views/warehouse/bindSupplierList'),
                meta: { title: '绑定供货商', keepAlive: false, permission: ['frontAgentBindSupplier'] }
              },
            ]
          },
          {
            path: '/saas/productAgent',
            name: 'SaasProductAgent',
            component: RouteView,
            redirect: '/saas/productAgentList',
            meta: { title: '产品代理', keepAlive: false, permission: ['areaUnderGoodsAgent'] },
            children: [
              {
                path: '/saas/productAgentList',
                name: 'SaasProductAgentList',
                component: () => import('@/views/daili/productAgent'),
                meta: { permission: ['areaUnderGoodsAgent'], title: '产品代理' }
              },
              // {
              //   path: '/saas/commissionSetting',
              //   name: 'SaasCommissionSetting',
              //   component: () => import('@/views/daili/commissionSetting'),
              //   meta: {  permission: ['areaUnderGoodsAgent'], title: '佣金设置' }
              // },
            ]
          },

          {
            path: '/saas/bindProductList',
            name: 'bindProductList',
            component: () => import('@/views/daili/bindProductList'),
            meta: { title: '已绑定产品', keepAlive: false, permission: ['saasGoodsAgentGoods'] }
          },

        ]
      },
      {
        path: '/saas/popularizeAgent',
        component: RouteView,
        name: 'SaasPsopularizeAgent',
        redirect: '/saas/popularizeAgent',
        meta: { title: '推广', icon: 'solution', permission: ['bdAgent'] },
        children: [
          {
            path: '/saas/popularizeAgentList',
            name: 'SaasPopularizeAgentList',
            component: () => import('@/views/daili/popularizeAgentList'),
            meta: { permission: ['bdAgentList'], title: '推广代理' }
          },
          {
            path: '/saas/agency/applyPromotionList',
            name: 'SaasAgencyApplyPromotionList',
            component: () => import('@/views/saas/areaAgentApply'),
            meta: { title: '代理申请', keepAlive: false, permission: ['bdAgentApply'], type: 1 }
          },
          {
            path: '/saas/popularizeCommissionSetting',
            name: 'SaasPopularizeCommissionSetting',
            component: () => import('@/views/daili/popularizeCommissionSetting'),
            meta: { permission: ['bdAgentProfitSet'], title: '佣金设置' }
          },
          {
            path: '/saas/agency/salesman',
            name: 'SaasAgencySalesman',
            component: () => import('@/views/saas/Salesman'),
            meta: { title: '业务员', keepAlive: false, permission: ['saasAgencySalesman'] }
          },
        ]
      },
      {
        path: '/saas/user',
        component: RouteView,
        name: 'saas_user',
        redirect: '/saas/user-list',
        meta: { title: '用户', icon: 'user', permission: ['saasAllianceUser'] },
        children: [
          {
            path: '/saas/user-list',
            name: 'saasUsers',
            component: () => import('@/views/saas/User'),
            meta: { title: '联盟用户', keepAlive: false, permission: ['saasAllianceUserList'] }
          },
          {
            path: '/saas/user-detail',
            name: 'saasUsersDetail',
            hidden: true,
            component: () => import('@/views/saas/UserDetail'),
            meta: { title: '联盟用户', keepAlive: false, permission: ['saasAllianceUserList'] }
          }
        ]
      },
      {
        path: '/saas/diy',
        // component: RouteView,
        component: () => import('@/views/saas/diy/Index'),
        name: 'saas_diy',
        redirect: '/saas/diy/index',
        meta: { title: '装修', icon: 'layout', permission: ['saasDiy'] },
        children: [
          {
            path: '/saas/diy/index',
            name: 'saasDiyNew',
            hidden: true,
            component: () => import('@/views/saas/diy/Index'),
            meta: { title: 'diy首页', keepAlive: false, permission: ['saasDiy'], target: '_blank' }
          }
        ]
      },
      {
        path: '/saas/alliance',
        component: RouteView,
        name: 'saasAlliance',
        redirect: '/saas/alliance/shopDistribution',
        meta: { title: '联盟', icon: 'team', permission: ['saasAlliance'] },
        children: [
          {
            path: '/DividendSetting',
            name: 'DividendSetting',
            meta: { title: '分润设置总项', keepAlive: false, permission: ['saasAllianceShareAll'] },
            component: () => import('@/views/saas/setting/DividendSetting/index'),
          },
          {
            path: '/saas/alliance/shopDistribution',
            name: 'saasAllianceShopDistribution',
            redirect: '/saas/alliance/shopDistribution/list',
            component: RouteView,
            children: [
              {
                path: '/saas/alliance/shopDistribution/list',
                name: 'saasAllianceShopDistributionList',
                component: () => import('@/views/saas/alliance/ShopDistributionList'),
                meta: { title: '店铺分销', keepAlive: false, permission: ['saasAllianceStoreShare'] }
              },
              {
                path: '/saas/alliance/shopDistribution/commission',
                name: 'saasAllianceShopDistributionCommission',
                component: () => import('@/views/saas/alliance/ShopDistributionCommission'),
                meta: { title: '佣金明细', keepAlive: false, permission: ['saasAllianceStoreShare'] }
              }
            ],
            meta: { title: '店铺分销', keepAlive: false, permission: ['saasAllianceStoreShare'] }
          },
          {
            path: '/saas/alliance/allianceDistribution',
            name: 'saasAllianceAllianceDistribution',
            redirect: '/saas/alliance/allianceDistribution/list',
            component: RouteView,
            children: [
              {
                path: '/saas/alliance/allianceDistribution/list',
                name: 'saasAllianceAllianceDistributionList',
                component: () => import('@/views/saas/alliance/AllianceDistributionList'),
                meta: { title: '联盟分销', keepAlive: false, permission: ['saasAllianceShare'] }
              },
              {
                path: '/saas/alliance/allianceDistribution/commission',
                name: 'saasAllianceAllianceDistributionCommission',
                component: () => import('@/views/saas/alliance/AllianceDistributionCommission'),
                meta: { title: '佣金明细', keepAlive: false, permission: ['saasAllianceShare'] }
              }
            ],
            meta: { title: '联盟分销', keepAlive: false, permission: ['saasAllianceShare'] }
          },
          {
            path: '/saas/alliance/shopReferrer',
            name: 'saasAllianceShopReferrer',
            redirect: '/saas/alliance/shopReferrer/list',
            component: RouteView,
            children: [
              {
                path: '/saas/alliance/shopReferrer/list',
                name: 'saasAllianceShopReferrerList',
                component: () => import('@/views/saas/alliance/ShopReferrerList'),
                meta: { title: '店铺推荐人', keepAlive: false, permission: ['saasAllianceStoreRecommender'] }
              },
              {
                path: '/saas/alliance/shopReferrer/commission',
                name: 'saasAllianceShopReferrerCommission',
                component: () => import('@/views/saas/alliance/ShopReferrerCommission'),
                meta: { title: '佣金明细', keepAlive: false, permission: ['saasAllianceStoreRecommender'] }
              }
            ],
            meta: { title: '店铺推荐人', keepAlive: false, permission: ['saasAllianceStoreRecommender'] }
          },
          {
            path: '/saas/setting/leagueCoupon/index',
            name: 'saasLeagueCoupon',
            component: () => import('@/views/saas/setting/leagueCoupon/index'),
            meta: { title: '联盟券设置', keepAlive: false, permission: ['saasAllianceCouponSetting'] }
          },
          {
            path: '/saas/alliance/consumerRebate',
            name: 'saasAllianceConsumerRebate',
            redirect: '/saas/alliance/consumerRebate/list',
            component: RouteView,
            children: [
              {
                path: '/saas/alliance/consumerRebate/list',
                name: 'saasAllianceConsumerRebateList',
                component: () => import('@/views/saas/alliance/ConsumerRebateList'),
                meta: { title: '消费返利', keepAlive: false, permission: ['saasAllianceConsumeRebate'] }
              },
              {
                path: '/saas/alliance/consumerRebate/commission',
                name: 'saasAllianceConsumerRebateCommission',
                component: () => import('@/views/saas/alliance/ConsumerRebateCommission'),
                meta: { title: '佣金明细', keepAlive: false, permission: ['saasAllianceConsumeRebate'] }
              }
            ],
            meta: { title: '消费返利', keepAlive: false, permission: ['saasAllianceConsumeRebate'] }
          },
          {
            path: '/payFaceToFace/IntegralRule/list',
            name: 'payFaceToFaceIntegralRuleList',
            component: () => import('@/views/saas/payFaceToFace/IntegralRule/list'),
            meta: { title: '当面付积分', keepAlive: false, permission: ['saasAllianceFaceIntegral'] }
          },
          {
            path: '/memberPermission',
            name: 'memberPermission',
            redirect: '/memberPermissionList',
            component: RouteView,
            meta: { title: '会员权限', keepAlive: false, permission: ['saasAllianceUserAuth'] },
            children: [
              {
                path: '/memberPermissionList',
                name: 'memberPermissionList',
                component: () => import('@/views/saas/memberPermission/list'),
                meta: { title: '会员权限', keepAlive: false, permission: ['saasAllianceUserAuth'] }
              },
              {
                path: '/memberPermissionSetting',
                name: 'memberPermissionSetting',
                component: () => import('@/views/saas/memberPermission/setting'),
                meta: { title: '权限设置', keepAlive: false, permission: ['saasAllianceUserAuth'] }
              }
            ],
          },
          {
            path: '/sass/aliance/supplier',
            name: 'supplier',
            meta: { title: '供货商推荐人', keepAlive: false, permission: 'saasAllianceSupplierAuth' },
            redirect: '/sass/aliance/supplier/list',
            component: RouteView,
            children: [
              {
                path: '/sass/aliance/supplier/list',
                name: 'supplierList',
                meta: { title: '供货商推荐人' },
                component: () => import('@/views/saas/alliance/supplierList'),
              },
              {
                path: '/sass/aliance/supplier/log',
                name: 'supplierLog',
                meta: { title: '佣金明细' },
                component: () => import('@/views/saas/alliance/supplierLog'),
              },

            ]
          },
          // {
          //   path: '/payFaceToFace/IntegralRule/edit',
          //   name: 'payFaceToFaceIntegralRuleEdit',
          //   component: () => import('@/views/saas/payFaceToFace/IntegralRule/edit'),
          //   hidden: true,
          //   meta: {
          //     title: '当面付规则编辑',
          //     keepAlive: false,
          //     permission: ['saasIntegralCat'] }
          // }
          // {
          //   path: '/saas/alliance/consumerRebate',
          //   name: 'saasAllianceConsumerRebate',
          //   redirect: '/saas/alliance/consumerRebate/list',
          //   component: RouteView,
          //   children:[
          //     {
          //       path: '/saas/alliance/consumerRebate/list',
          //       name: 'saasAllianceConsumerRebateList',
          //       component: () => import('@/views/saas/alliance/ConsumerRebateList'),
          //       meta: { title: '消费返利', keepAlive: false, permission: ['saasIntegralCat'] }
          //     },
          //     {
          //       path: '/saas/alliance/consumerRebate/commission',
          //       name: 'saasAllianceConsumerRebateCommission',
          //       component: () => import('@/views/saas/alliance/ConsumerRebateCommission'),
          //       meta: { title: '佣金明细', keepAlive: false, permission: ['saasIntegralCat'] }
          //     }
          //   ],
          //   meta: { title: '消费返利', keepAlive: false, permission: ['saasIntegralCat'] }
          // },
          // {
          //   path: '/saas/alliance-check',
          //   name: 'allianceCheck',
          //   component: () => import('@/views/saas/AlliancesCheck'),
          //   meta: { title: '联盟入驻审核', keepAlive: false, permission: ['allianceCheck'] }
          // }
        ]
      },
      {
        path: '/saas/marketing',
        component: RouteView,
        name: 'saasMarketing',
        redirect: '/saas/marketing/distribution',
        meta: { title: '营销', icon: 'profile', permission: ['saasMarketingBusiness'] },
        children: [
          {
            path: '/saas/marketing/distribution',
            name: 'saasDistribution',
            component: RouteView,
            redirect: '/saas/marketing/distribution/poster',
            meta: { title: '推广海报设置', keepAlive: false, permission: ['saasDistribution'] },
            children: [
              // {
              //   path: '/saas/marketing/distribution/order',
              //   name: 'saasDistributionOrder',
              //   component: () => import('@/views/saas/marketing/DistributionOrder'),
              //   meta: { title: '分销订单', keepAlive: false, permission: ['saasDistributionOrder'] },
              // },
              {
                path: '/saas/marketing/distribution/poster',
                name: 'saasDistributionPoster',
                component: () => import('@/views/saas/marketing/Poster'),
                meta: { title: '推广海报', permission: ['saasDistributionPoster'] }
              }
            ]
          },
          {
            path: '/saas/marketing/vip',
            name: 'saasMarketingVip',
            redirect: '/saas/marketing/vip/management',
            component: RouteView,
            meta: { title: '会员卡', icon: 'profile', permission: ['saasMemberManageBusiness'] },
            children: [
              {
                path: '/saas/marketing/vip/management',
                name: 'saasMarketingVipManagement',
                component: () => import('@/views/saas/marketing/VipManagemant'),
                meta: { permission: ['saasMemberManageBusiness'], title: '会员卡管理' }
              },
              {
                path: '/saas/marketing/vip/record',
                name: 'saasMarketingVipRecord',
                component: () => import('@/views/saas/marketing/VipRecord'),
                meta: { permission: ['saasMemberManageBusiness'], title: '购卡记录' }
              },
              {
                path: '/saas/marketing/vip/edit',
                name: 'saasMarketingVipEdit',
                hidden: true,
                component: () => import('@/views/saas/marketing/VipEdit'),
                meta: { permission: ['saasMemberManageBusiness'], title: '编辑会员卡' }
              }
            ]
          },

          {
            path: '/saas/marketing/coupon',
            name: 'saasMarketingCoupon',
            component: () => import('@/views/saas/marketing/Coupon'),
            meta: { title: '优惠券', keepAlive: false, permission: ['saasCouponManageBusiness'] }
          },
          {
            path: '/saas/marketing/WeChatVip',
            name: 'saasWeChatVipCardSetting',
            redirect: '/saas/marketing/WeChatVipCard/setting',
            component: RouteView,
            meta: { title: '微信会员卡', icon: 'profile', permission: ['saasMarketingWeChatVipCard'] },
            children: [
              {
                path: '/saas/marketing/WeChatVipCard/setting',
                name: 'saasWeChatVipCardSetting',
                component: () => import('@/views/saas/marketing/WeChatVipCard/Setting'),
                meta: { permission: ['saasMarketingWeChatVipCard'], title: '公众号设置' }
              },
              {
                path: '/saas/marketing/WeChatVipCard/cardList',
                name: 'saasWeChatVipCardList',
                component: () => import('@/views/saas/marketing/WeChatVipCard/List'),
                meta: { permission: ['saasMarketingWeChatVipCard'], title: '会员卡列表' }
              },
              {
                path: '/saas/marketing/WeChatVipCard/cardBindList',
                name: 'saasWeChatVipCardBindList',
                component: () => import('@/views/saas/marketing/WeChatVipCard/BindList'),
                meta: { permission: ['saasMarketingWeChatVipCard'], title: '绑卡记录' }
              }
              // hidden: true,
            ]
          },
          {
            path: '/jushuitan/platform',
            name: 'JushuitanPlatform',
            component: () => import('@/views/jushuitan/platform-setting'),
            meta: { title: '聚水潭', keepAlive: false, permission: ['jushuitan'] }
          },
          {
            path: '/maltField/setting',
            name: 'maltFieldSetting',
            component: () => import('@/views/maltField/setting.vue'),
            hidden: false,
            keepAlive: true,
            meta: { title: '麦芽田', permission: ['maiyatian'], icon: '' }
          },

        ]
      },
      {
        path: '/saas/purchase',
        component: RouteView,
        name: 'saasPurchase',
        redirect: '/saas/purchase/purchaseList',
        meta: { title: '云仓', icon: 'shopping', permission: ['saasCloudPlatform'] },
        children: [
          {
            path: '/saas/purchase/purchaseList',
            redirect: '/saas/purchase/purchaseList/apply',
            component: RouteView,
            name: 'saasPurchaseList',
            meta: { title: '云仓申请', keepAlive: false, permission: ['saasCloudPlatformApply'] },
            children: [
              {
                path: '/saas/purchase/purchaseList/apply',
                name: 'saasPurchaseListApply',
                component: () => import('@/views/saas/purchase/purchase/purchaseList'),
                meta: { title: '云仓申请', keepAlive: false, permission: ['saasCloudPlatformApply'] },
              },
              {
                path: '/saas/purchase/purchaseList/setting',
                name: 'saasPurchaseListSetting',
                component: () => import('@/views/saas/purchase/purchase/purchaseSetting'),
                meta: { title: '云仓设置', keepAlive: false, permission: ['saasCloudPlatformSetting'] },
              }
            ]
          },
          {
            path: '/saas/purchase/business',
            component: RouteView,
            redirect: '/saas/purchase/business/list',
            name: 'saasBusiness',
            meta: { title: '云仓用户', keepAlive: false, permission: ['saasCloudPlatformUser'] },
            children: [
              {
                path: '/saas/purchase/business/list',
                name: 'saasBusinessList',
                component: () => import('@/views/saas/purchase/business/list'),
                meta: { title: '用户列表', keepAlive: false, permission: ['saasCloudPlatformUser'] }
              },
              {
                path: '/saas/purchase/business/memberList',
                name: 'saasBusinessMemberList',
                component: () => import('@/views/saas/purchase/business/member'),
                meta: { title: '会员等级', keepAlive: false, permission: ['saasCloudPlatformUser'] }
              },
              // {
              //   path: '/saas/purchase/business/bandRecord',
              //   name: 'saasBusinessBand',
              //   component: () => import('@/views/saas/purchase/business/bandRecord'),
              //   meta: { title: '绑定商品记录', keepAlive: false, permission: ['cloudPlatform'] }
              // },
              // {
              //   path: '/saas/purchase/business/transRecord',
              //   name: 'saasBusinessTrans',
              //   component: () => import('@/views/saas/purchase/business/transRecord'),
              //   meta: { title: '转单记录', keepAlive: false, permission: ['cloudPlatform'] }
              // },
              // {
              //   path: '/saas/purchase/business/purchaseRecord',
              //   name: 'saasBusinessPurchase',
              //   component: () => import('@/views/saas/purchase/business/purchaseRecord'),
              //   meta: { title: '采购记录', keepAlive: false, permission: ['cloudPlatform'] }
              // },
              {
                path: '/saas/purchase/business/balanceRecord',
                name: 'saasBusinessBalance',
                component: () => import('@/views/saas/purchase/business/balanceRecord'),
                meta: { title: '余额变动记录', keepAlive: false, permission: ['cloudPlatform'] }
              },
              {
                path: '/saas/purchase/business/rechargeRecord',
                name: 'saasBusinessRecharge',
                component: () => import('@/views/saas/purchase/business/rechargeRecord'),
                meta: { title: '充值记录', keepAlive: false, permission: ['cloudPlatform'] }
              },
              // {
              //   path: '/saas/purchase/noExamine/goods',
              //   name: 'noExamineGoods',
              //   component: () => import('@/views/saas/purchase/noExamine/goods'),
              //   meta: { title: '商品审核', keepAlive: false, permission: ['saasProfit'] }
              // },
              // {
              //   path: '/saas/purchase/noExamine/member',
              //   name: 'noExamineMember',
              //   component: () => import('@/views/saas/purchase/noExamine/member'),
              //   meta: { title: '会员审核', keepAlive: false, permission: ['saasProfit'] }
              // }
            ]
          },
          {
            path: '/saas/purchase/supplier',
            component: RouteView,
            redirect: '/saas/purchase/supplier/list',
            name: 'saasSupplier',
            meta: { title: '云仓供货商', keepAlive: false, permission: ['saasCloudPlatformSupplier'] },
            children: [
              {
                path: '/saas/purchase/supplier/list',
                name: 'saasSupplierList',
                component: () => import('@/views/saas/purchase/supplier/list'),
                meta: { title: '供货商列表', keepAlive: false, permission: ['saasCloudPlatformSupplier'] }
              },
              // {
              //   path: '/saas/purchase/supplier/transRecord',
              //   name: 'saasSupplierTrans',
              //   component: () => import('@/views/saas/purchase/supplier/transRecord'),
              //   meta: { title: '转单记录', keepAlive: false, permission: ['cloudPlatform'] }
              // },
              // {
              //   path: '/saas/purchase/supplier/purchaseRecord',
              //   name: 'saasSupplierPurchase',
              //   component: () => import('@/views/saas/purchase/supplier/purchaseRecord'),
              //   meta: { title: '采购记录', keepAlive: false, permission: ['cloudPlatform'] }
              // },
              {
                path: '/saas/purchase/supplier/balanceRecord',
                name: 'saasSupplierBalance',
                component: () => import('@/views/saas/purchase/supplier/balanceRecord'),
                meta: { title: '余额变动记录', keepAlive: false, permission: ['saasCloudPlatformSupplier'] }
              }
            ]
          },
          {
            path: '/saas/purchase/audit',
            name: 'saasPurchaseAudit',
            redirect: '/saas/purchase/audit/list',
            component: RouteView,
            meta: { title: '云仓商品', permission: ['saasCloudPlatformGoods'] },
            children: [
              {
                path: '/saas/purchase/audit/list',
                name: 'saasPurchaseAuditList',
                component: () => import('@/views/saas/purchase/audit/auditList'),
                meta: { title: '商品审核列表', permission: ['saasCloudPlatformGoods'] }
              },
              {
                path: '/saas/purchase/audit/goods',
                name: 'saasPurchaseAuditGoods',
                component: () => import('@/views/saas/purchase/audit/goods'),
                meta: { title: '云仓商品', permission: ['saasCloudPlatformGoods'] }
              },
              {
                path: '/saas/purchase/category',
                name: 'saasSupplierCategory',
                component: () => import('@/views/saas/purchase/category/List'),
                meta: { title: '云仓分类', keepAlive: false, permission: ['saasCloudPlatformGoodsCat'] }
              },
              {
                path: '/saas/purchase/audit/edit',
                name: 'saasPurchaseAuditEdit',
                hidden: true,
                component: () => import('@/views/saas/purchase/audit/addGood'),
                meta: { title: '商品审核详情', keepAlive: false, permission: ['saasCloudPlatformGoods'] }
              }
            ]
          },
          {
            path: '/saas/supplierOrder',
            name: 'saasSupplierOrder',
            redirect: '/saas/supplierOrder',
            component: RouteView,
            meta: { title: '云仓订单', permission: ['saasCloudPlatformOrder'] },
            children: [
              {
                path: '/saas/supplierOrder',
                name: 'saasSupplierOrder',
                component: () => import('@/views/saas/supplierPurchase/trans/order'),
                meta: { title: '自主配送', keepAlive: false, permission: ['saasCloudPlatformOrder'] }
              },
              {
                path: '/saas/supplierOrderExpress',
                name: 'saasSupplierOrderExpress',
                component: () => import('@/views/saas/supplierPurchase/order/purchaseOrder'),
                meta: { title: '快递订单', keepAlive: false, permission: ['saasCloudPlatformOrder'] }
              },
              {
                path: '/saas/supplierOrderPurchase',
                name: 'saasSupplierOrderPurchase',
                component: () => import('@/views/saas/supplierPurchase/centralizedPurchase/index'),
                meta: { title: '集采订单', keepAlive: false, permission: ['saasCloudPlatformOrder'] }
              },
              {
                path: '/saas/supplierOrderDaili',
                name: 'saasSupplierOrderDaili',
                component: () => import('@/views/saas/supplierPurchase/order/orderStatistics/purchaseOrder'),
                meta: { title: '代理订单', keepAlive: false, permission: ['saasCloudPlatformOrder'] }
              }
            ]
          },
          {
            path: '/saas/purchase/finance',
            name: 'saasPurchaseFinance',
            redirect: '/saas/purchase/finance/withdrawRecord',
            component: RouteView,
            meta: { title: '云仓财务', permission: ['saasCloudPlatformFinance'] },
            children: [
              {
                path: '/saas/purchase/finance/withdrawRecord',
                name: 'saasSupplierFinanceWithdraw',
                component: () => import('@/views/saas/purchase/finance/withdrawRecord'),
                meta: { title: '提现申请', keepAlive: false, permission: ['saasCloudPlatformFinance'] }
              },
              {
                path: '/saas/purchase/finance/recordList',
                name: 'saasPurchaseFinanceRecordList',
                component: () => import('@/views/saas/purchase/finance/recordList'),
                meta: { title: '提现记录', keepAlive: false, permission: ['saasCloudPlatformFinance'] }
              }
            ]
          },
          {
            path: '/saas/purchase/stbz',
            name: 'saasPurchaseStbz',
            redirect: '/saas/purchase/stbz/setting',
            component: RouteView,
            meta: { title: '胜天半子', permission: ['saasCloudPlatformStbz'] },
            children: [
              {
                path: '/saas/purchase/stbz/setting',
                name: 'saasPurchaseStbzSetting',
                component: () => import('@/views/saas/purchase/stbz/setting'),
                meta: { title: '账号设置', keepAlive: false, permission: ['saasCloudPlatformStbz'] }
              },
              {
                path: '/saas/purchase/stbz/select',
                name: 'saasPurchaseStbzSelect',
                component: () => import('@/views/saas/purchase/stbz/goodsList'),
                meta: { title: '在线选品', keepAlive: false, permission: ['saasCloudPlatformStbz'] }
              },
              // {
              //   path: '/saas/purchase/stbz/cashFlow',
              //   name: 'saasPurchaseStbzCashFlow',
              //   component: () => import('@/views/saas/purchase/stbz/cashFlow'),
              //   meta: { title: '资金流水', keepAlive: false, permission: ['saasCloudPlatformStbz'] }
              // }
            ]
          },
          {
            path: '/warehouse/CentralizedPurchaseOrder',
            component: () => import('@/views/warehouse/centralizedPurchaseOrder'),
            name: 'warehouseCentralizedPurchaseOrder',
            meta: { title: '供货商集采订单', keepAlive: false, permission: ['cloudSupplierAgentGroupOrder'] }
          },
          {
            path: '/saas/dailiDistribution',
            // component: () => import('@/views/saas/supplierPurchase/dailiDistribution/index'),
            name: 'dailiDistributionOrder',
            meta: { title: '配货单', keepAlive: false, permission: ['cloudSupplierDailiOrder'] },
            redirect: '/saas/dailiDistribution',
            component: RouteView,
            children: [
              {
                path: '/saas/dailiDistribution/peihuo',
                name: 'dailiDistributionOrderPeihuo',
                component: () => import('@/views/saas/supplierPurchase/dailiDistribution/index'),
                meta: { title: '配货单', keepAlive: false, permission: ['cloudSupplierDailiOrder'] }
              },
              {
                path: '/saas/dailiDistribution/fenlian',
                name: 'dailiDistributionOrderFenlian',
                component: () => import('@/views/saas/supplierPurchase/dailiDistribution/fenlian'),
                meta: { title: '分拣单', keepAlive: false, permission: ['cloudSupplierDailiOrder'] }
              },
              // {
              //   path: '/saas/purchase/stbz/cashFlow',
              //   name: 'saasPurchaseStbzCashFlow',
              //   component: () => import('@/views/saas/purchase/stbz/cashFlow'),
              //   meta: { title: '资金流水', keepAlive: false, permission: ['saasCloudPlatformStbz'] }
              // }
            ]
          },
          // {
          //   path: '/saas/supplierPurchaseOrder/t',
          //   redirect: '/saas/supplierPurchaseOrder/trans',
          //   component: RouteView,
          //   name: 'saasSupplierPurchaseTransOrder',
          //   meta: { title: '自主配送', keepAlive: false, permission: ['cloudSupplierDailiOrder'] },
          //   children:[{
          //     path: '/saas/supplierPurchaseOrder/trans',
          //     component: () => import('@/views/saas/supplierPurchase/trans/order'),
          //     name: 'saasSupplierPurchaseTransOrder',
          //     meta: { title: '自主配送', keepAlive: false, permission: ['cloudSupplierDailiOrder'] },
          //   },
          //     {
          //       path: '/saas/supplierPurchaseGoods/transRefund',
          //       name: 'saasSupplierPurchaseTransRefund',
          //       component: () => import('@/views/saas/supplierPurchase/afterSale/order'),
          //       meta: { title: '配送售后', keepAlive: false, permission: ['cloudSupplierDailiOrder'] }
          //     }]
          // },
          {
            path: '/saas/supplierPurchaseGoods/purOrder',
            name: 'saasSupplierPurchasePurOrder',
            component: RouteView,
            redirect: '/saas/supplierPurchaseGoods/purOrder',
            meta: { title: '快递订单', keepAlive: false, permission: ['cloudSupplierOrderOnce'] },
            children: [{
              path: '/saas/supplierPurchaseGoods/purOrder',
              name: 'saasSupplierPurchasePurOrder',
              component: () => import('@/views/saas/supplierPurchase/order/purchaseOrder'),
              meta: { title: '快递订单', keepAlive: false, permission: ['cloudSupplierOrderOnce'] }
            }, {
              path: '/saas/supplierPurchaseGoods/purchaseAfterSale',
              name: 'saasSupplierPurchasePurOrderAfterSale',
              component: () => import('@/views/saas/supplierPurchase/order/purchaseAfterSale'),
              meta: { title: '快递售后', keepAlive: false, permission: ['cloudSupplierOrderOnce'] }
            }]
          },
          {
            path: '/saas/supplierPurchaseGoods/trans/detail',
            name: 'saasSupplierPurchaseTransOrderDetail',
            hidden: true,
            component: () => import('@/views/saas/supplierPurchase/trans/detail'),
            meta: { title: '商城转单详情', keepAlive: false, permission: ['cloudSupplierDailiOrder'] }
          },
          // {
          //   path: '/saas/purchase/setting',
          //   component: () => import('@/views/saas/purchase/setting/setting'),
          //   name: 'saasPurchaseSetting',
          //   meta: { title: '采购配置', keepAlive: false, permission: ['cloudPlatform'] }
          // }
          // {
          //   path: '/saas/purchase/noExamine/supplier',
          //   component: RouteView,
          //   redirect: '/saas/purchase/noExamine/supplier',
          //   name: 'noExamineSupplier',
          //   meta: { title: '待审核列表', keepAlive: false, permission: ['saasProfit'] },
          //   children: [
          //     {
          //       path: '/saas/purchase/noExamine/supplier',
          //       name: 'noExamineSupplier',
          //       component: () => import('@/views/saas/purchase/noExamine/supplier'),
          //       meta: { title: '待审核列表', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/noExamine/goods',
          //       name: 'noExamineGoods',
          //       component: () => import('@/views/saas/purchase/noExamine/goods'),
          //       meta: { title: '商品审核', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/noExamine/member',
          //       name: 'noExamineMember',
          //       component: () => import('@/views/saas/purchase/noExamine/member'),
          //       meta: { title: '会员审核', keepAlive: false, permission: ['saasProfit'] }
          //     }
          //   ]
          // },
          // {
          //   path: '/saas/purchase/supplier/list',
          //   component: () => import('@/views/saas/purchase/supplier/list'),
          //   name: 'saasPurchaseSupplierList',
          //   meta: { title: '供货商列表', keepAlive: false, permission: ['saasProfit'] }
          // },
          // {
          //   path: '/saas/purchase/goodsManager/list',
          //   component: RouteView,
          //   redirect: '/saas/purchase/goodsManager/list',
          //   name: 'purchaseGoodsManagerList',
          //   meta: { title: '产品库管理', keepAlive: false, permission: ['saasProfit'] },
          //   children: [
          //     {
          //       path: '/saas/purchase/goodsManager/list',
          //       name: 'purchaseGoodsManagerList',
          //       component: () => import('@/views/saas/purchase/goodsManager/list'),
          //       meta: { title: '产品库', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/goodsManager/cat',
          //       name: 'purchaseGoodsManagerCat',
          //       component: () => import('@/views/saas/purchase/goodsManager/cat'),
          //       meta: { title: '商品分类', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/goodsManager/goodsRecord',
          //       name: 'purchaseGoodsManagerGoodsRecord',
          //       component: () => import('@/views/saas/purchase/goodsManager/goodsRecord'),
          //       meta: { title: '商品上架记录', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/goodsManager/shopRecord',
          //       name: 'purchaseGoodsManagerShopRecord',
          //       component: () => import('@/views/saas/purchase/goodsManager/shopRecord'),
          //       meta: { title: '商城上架记录', keepAlive: false, permission: ['saasProfit'] }
          //     }
          //   ]
          // },
          // {
          //   path: '/saas/purchase/order/replace',
          //   component: RouteView,
          //   name: 'saasPurchaseOrderReplace',
          //   redirect: '/saas/purchase/order/replace',
          //   meta: { title: '订单管理', keepAlive: false, permission: ['saasProfit'] },
          //   children: [
          //     {
          //       path: '/saas/purchase/order/replace',
          //       name: 'saasPurchaseOrderReplace',
          //       component: () => import('@/views/saas/purchase/order/replace'),
          //       meta: { title: '代发订单', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/order/buy',
          //       name: 'saasPurchaseOrderBuy',
          //       component: () => import('@/views/saas/purchase/order/buy'),
          //       meta: { title: '采购订单', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/order/refund',
          //       name: 'saasPurchaseOrderRefund',
          //       component: () => import('@/views/saas/purchase/order/refund'),
          //       meta: { title: '售后订单', keepAlive: false, permission: ['saasProfit'] }
          //     }
          //   ]
          // },
          // {
          //   path: '/saas/purchase/member/list',
          //   component: RouteView,
          //   name: 'saasPurchaseMemberList',
          //   redirect: '/saas/purchase/member/list',
          //   meta: { title: '会员管理', keepAlive: false, permission: ['saasProfit'] },
          //   children: [
          //     {
          //       path: '/saas/purchase/member/list',
          //       name: 'saasPurchaseMemberList',
          //       component: () => import('@/views/saas/purchase/member/list'),
          //       meta: { title: '会员列表', keepAlive: false, permission: ['saasProfit'] }
          //     },
          //     {
          //       path: '/saas/purchase/member/buyLevel',
          //       name: 'saasPurchaseMemberBuyLevel',
          //       component: () => import('@/views/saas/purchase/member/buyLevel'),
          //       meta: { title: '采购等级', keepAlive: false, permission: ['saasProfit'] }
          //     }
          //   ]
          // },
          // {
          //   path: '/saas/purchase/cash/list',
          //   component: RouteView,
          //   name: 'saasPurchaseCashList',
          //   redirect: '/saas/purchase/cash/list',
          //   meta: { title: '提现管理', keepAlive: false, permission: ['saasProfit'] },
          //   children: [
          //     {
          //       path: '/saas/purchase/cash/list',
          //       name: 'saasPurchaseCashList',
          //       component: () => import('@/views/saas/purchase/cash/list'),
          //       meta: { title: '提现管理', keepAlive: false, permission: ['saasProfit'] }
          //     }
          //   ]
          // }
        ]
      },
      {
        path: '/driver',
        component: RouteView,
        name: 'driver',
        redirect: '/driver/driverList',
        meta: { title: '司机', icon: 'shopping', permission: ['cloudDriver'] },
        children: [
          {
            path: '/driver/driverList',
            component: () => import('@/views/driver/driverList'),
            name: 'driverList',
            meta: { title: '司机管理', keepAlive: false, permission: ['cloudDriver'] },
          },
          {
            path: '/driver/distributionRouteIndex',
            name: 'distributionRouteIndex',
            meta: { title: '线路配送', keepAlive: false, permission: ['cloudDriverLine'] },
            component: RouteView,
            redirect: '/driver/distributionRoute',
            children: [{
              component: () => import('@/views/driver/distributionRoute'),
              path: '/driver/distributionRoute',
              name: 'distributionRoute',
              meta: { title: '线路配送', keepAlive: false, permission: ['cloudDriverLine'] }
            }, {
              component: () => import('@/views/driver/exceptionList'),
              path: '/driver/exceptionList',
              name: 'driverExceptionList',
              meta: { title: '异常订单', keepAlive: false, permission: ['cloudDriverLine'] }
            }, {
              path: '/saas/supplierPurchaseGoods/distributionRouteInfo',
              name: 'saasSupplierDistributionRouteInfo',
              hidden: true,
              component: () => import('@/views/driver/distributionRouteInfo'),
              meta: { title: '路线单详情', keepAlive: false, permission: ['cloudDriverLine'] }
            }]
          },
        ]
      },
      // 供货商商品
      {
        path: '/saas/supplierPurchaseGoods',
        component: RouteView,
        name: 'saasSupplierPurchaseGoods',
        redirect: '/saas/supplierPurchaseGoods/list',
        meta: { title: '商品', icon: 'shopping', permission: ['cloudSupplier'] },
        children: [
          {
            path: '/saas/supplierPurchaseGoods/list',
            component: () => import('@/views/saas/supplierPurchase/goods/list'),
            name: 'saasSupplierPurchaseGoodsList',
            meta: { title: '商品列表', permission: ['cloudSupplier'] }
          },
          {
            path: '/saas/supplierPurchaseGoods/audit',
            name: 'saasSupplierPurchaseAudit',
            component: () => import('@/views/saas/supplierPurchase/audit/auditList'),
            meta: { title: '审核列表', keepAlive: false, permission: ['cloudSupplier'] }
          },
          {
            path: '/saas/supplierPurchaseGoods/edit',
            name: 'saasSupplierPurchaseGoodsEdit',
            hidden: true,
            component: () => import('@/views/saas/supplierPurchase/goods/addGood'),
            meta: { title: '添加商品', keepAlive: false, permission: ['cloudSupplier'] }
          }
        ]
      },
      // 供货商订单
      {
        path: '/saas/supplierPurchaseOrder',
        component: RouteView,
        name: 'saasSupplierPurchaseOrder',
        redirect: '/saas/supplierPurchaseOrder/trans',
        meta: { title: '订单', icon: 'shopping', permission: ['cloudSupplierOrder'] },
        children: [
          {
            path: '/order/list',
            name: 'OrderList',
            component: () => import('@/views/order/List'),
            meta: { title: '订单列表', permission: ['orderList'] }
          },
          {
            path: '/saas/supplierPurchaseOrder/t',
            redirect: '/saas/supplierPurchaseOrder/trans',
            component: RouteView,
            name: 'saasSupplierPurchaseTransOrder',
            meta: { title: '自主配送', keepAlive: false, permission: ['cloudSupplierOrderOnce'] },
            children: [{
              path: '/saas/supplierPurchaseOrder/trans',
              component: () => import('@/views/saas/supplierPurchase/trans/order'),
              name: 'saasSupplierPurchaseTransOrder',
              meta: { title: '自主配送', keepAlive: false, permission: ['cloudSupplierOrderOnce'] },
            },
            {
              path: '/saas/supplierPurchaseGoods/transRefund',
              name: 'saasSupplierPurchaseTransRefund',
              component: () => import('@/views/saas/supplierPurchase/afterSale/order'),
              meta: { title: '配送售后', keepAlive: false, permission: ['cloudSupplierOrderOnce'] }
            }]
          },
          {
            path: '/saas/supplierPurchaseGoods/purOrder',
            name: 'saasSupplierPurchasePurOrder',
            component: RouteView,
            redirect: '/saas/supplierPurchaseGoods/purOrder',
            meta: { title: '快递订单', keepAlive: false, permission: ['cloudSupplierOrderOnce'] },
            children: [{
              path: '/saas/supplierPurchaseGoods/purOrder',
              name: 'saasSupplierPurchasePurOrder',
              component: () => import('@/views/saas/supplierPurchase/order/purchaseOrder'),
              meta: { title: '订单列表', keepAlive: false, permission: ['cloudSupplierOrderOnce'] }
            }, {
              path: '/saas/supplierPurchaseGoods/purchaseAfterSale',
              name: 'saasSupplierPurchasePurOrderAfterSale',
              component: () => import('@/views/saas/supplierPurchase/order/purchaseAfterSale'),
              meta: { title: '订单售后', keepAlive: false, permission: ['cloudSupplierOrderOnce'] }
            }]
          },
          {
            path: '/saas/supplierPurchaseGoods/trans/detail',
            name: 'saasSupplierPurchaseTransOrderDetail',
            hidden: true,
            component: () => import('@/views/saas/supplierPurchase/trans/detail'),
            meta: { title: '商城转单详情', keepAlive: false, permission: ['cloudSupplierOrderOnce'] }
          },
          {
            path: '/saas/centralizedPurchaseOrder',
            redirect: '/saas/centralizedPurchaseOrder',
            component: RouteView,
            name: 'centralizedPurchaseOrder',
            meta: { title: '集采订单', keepAlive: false, permission: ['cloudSupplier'] },
            children: [{
              path: '/saas/centralizedPurchaseOrder',
              component: () => import('@/views/saas/supplierPurchase/centralizedPurchase/index'),
              name: 'centralizedPurchaseOrder',
              meta: { title: '集采订单', keepAlive: false, permission: ['cloudSupplier'] },
            },
            {
              path: '/saas/distributionOrder',
              component: () => import('@/views/saas/supplierPurchase/distribution/index'),
              name: 'distributionOrder',
              meta: { title: '配货单', keepAlive: false, permission: ['cloudSupplier'] }
            }]
          },
          {
            path: '/saas/supplierPurchaseGoods/orderStatisticsList',
            name: 'saasSupplierOrderStatisticsList',
            component: () => import('@/views/saas/supplierPurchase/order/orderStatistics/purchaseOrder'),
            meta: { title: '代理订单', keepAlive: false, permission: ['cloudSupplierOrder'] }
          },
          {
            path: '/saas/supplierPurchaseGoods/orderStatisticsDetails',
            name: 'saasSupplierOrderStatisticsDetails',
            hidden: true,
            component: () => import('@/views/saas/supplierPurchase/order/orderStatistics/purchaseDetail'),
            meta: { title: '代理订单详情', keepAlive: false, permission: ['cloudSupplierOrder'] }
          },
          {
            path: '/saas/supplierPurchaseGoods/purOrderDetail',
            name: 'saasSupplierPurchasePurOrderDetail',
            hidden: true,
            component: () => import('@/views/saas/supplierPurchase/order/purchaseDetail'),
            meta: { title: '采购订单详情', keepAlive: false, permission: ['cloudSupplierOrder'] }
          },

          {
            path: '/order/offline-list',
            name: 'OrderOfflineList',
            component: () => import('@/views/order/OfflineList'),
            meta: { title: '自提订单', permission: ['orderOfflineList'] }
          },
          {
            path: '/order/refund-list',
            name: 'OrderRefundList',
            component: () => import('@/views/order/RefundList'),
            meta: { title: '售后订单', permission: ['orderRefundList'] }
          },
          {
            path: '/order/order-details',
            name: 'OrderDetails',
            hidden: true,
            component: () => import('@/views/order/OrderDetails'),
            meta: { title: '订单详情', keepAlive: false, permission: ['orderList'] }
          },
          {
            path: '/order/comment',
            name: 'OrderComment',
            component: () => import('@/views/order/Comment'),
            meta: { title: '评价管理', permission: ['orderComment'] }
          },
          {
            path: '/order/scan-list',
            name: 'OrderScanList',
            component: () => import('@/views/order/ScanList'),
            meta: { title: '当面付订单', permission: ['orderScanList'] }
          },
        ]
      },
      // 供货商财务
      {
        path: '/saas/supplierPurchaseFinance',
        component: RouteView,
        name: 'saasSupplierPurchaseFinance',
        redirect: '/saas/supplierPurchaseFinance/account',
        meta: { title: '财务', icon: 'shopping', permission: ['cloudSupplier'] },
        children: [
          {
            path: '/saas/supplierPurchaseFinance/account',
            redirect: '/saas/supplierPurchaseFinance/account/balance',
            component: RouteView,
            name: 'saasSupplierPurchaseFinanceAccount',
            meta: { title: '我的账户', keepAlive: false, permission: ['cloudSupplier'] },
            children: [
              {
                path: '/saas/supplierPurchaseFinance/account/balance',
                name: 'saasSupplierPurchaseFinanceBalance',
                component: () => import('@/views/saas/supplierPurchase/supplier/balanceRecord'),
                meta: { title: '账户余额', keepAlive: false, permission: ['cloudSupplier'] },
              },
              {
                path: '/saas/supplierPurchaseFinance/account/balanceDisabled',
                name: 'saasSupplierPurchaseFinanceBalanceDisabled',
                component: () => import('@/views/saas/supplierPurchase/supplier/balanceRecordDisabled'),
                meta: { title: '冻结余额', keepAlive: false, permission: ['cloudSupplier'] }
              },
              {
                path: '/saas/supplierPurchaseFinance/account/balanceDisabled',
                name: 'saasSupplierPurchaseFinanceMonth',
                component: () => import('@/views/saas/supplierPurchase/supplier/withdrawRecord'),
                meta: { title: '月对账单', keepAlive: false, permission: ['cloudSupplier'] }
              }
            ]
          }
        ]
      },
      // 供货商设置
      {
        path: '/saas/supplierPurchaseSetting',
        component: RouteView,
        name: 'saasSupplierPurchaseSetting',
        redirect: '/saas/supplierPurchaseSetting/postage',
        meta: { title: '设置', icon: 'shopping', permission: ['cloudSupplier'] },
        children: [
          {
            path: '/saas/supplierPurchaseSetting/postage',
            name: 'saasSupplierPurchasePostage',
            component: () => import('@/views/saas/supplierPurchase/goods/postage'),
            meta: { title: '运费规则', keepAlive: false, permission: ['cloudSupplier'] }
          },
          {
            path: '/saas/supplierPurchaseSetting/salesRules',
            name: 'saasSupplierPurchaseSalesRules',
            component: () => import('@/views/saas/supplierPurchase/goods/salesRules'),
            meta: { title: '销售规则', keepAlive: false, permission: ['cloudSupplier'] }
          },
          {
            path: '/saas/supplierPurchaseSetting/kefu',
            name: 'saasSupplierPurchaseKefu',
            component: () => import('@/views/saas/supplierPurchase/goods/kefu'),
            meta: { title: '客服设置', keepAlive: false, permission: ['cloudSupplier'] }
          },
          {
            path: '/setting/print-setting',
            name: 'printSetting',
            component: RouteView,
            redirect: '/setting/express',
            meta: {
              title: '打印设置',
              permission: ['cloudSupplier']
            },
            children: [
              {
                path: '/setting/express',
                name: 'Express',
                component: () => import('@/views/setting/Express'),
                meta: {
                  title: '电子面单',

                  permission: ['cloudSupplier']
                }
              },
              {
                path: '/setting/printer',
                name: 'Printer',
                component: () => import('@/views/setting/Printer'),
                meta: {
                  title: '小票打印',

                  permission: ['cloudSupplier']
                }
              }
            ]
          },
          {
            path: '/supplierBindList',
            name: 'supplierBindList',
            component: () => import('@/views/warehouse/supplierBindList'),
            meta: {
              title: '绑定前置仓',
              permission: ['cloudSupplier']
            },
          }
        ]
      },
      // 供货商三方
      {
        path: '/jushuitan/supplier-setting',
        component: RouteView,
        name: 'jushuitan—supplier-setting',
        redirect: '/jushuitan/supplier-setting',
        meta: { title: '三方', icon: 'shopping', permission: ['cloudSupplier'] },
        children: [
          {
            path: '/jushuitan/supplier-setting',
            name: 'jushuitan—supplier-setting',
            component: () => import('@/views/jushuitan/supplier-setting'),
            meta: { title: '聚水潭', keepAlive: false, permission: ['cloudSupplier'] }
          }
        ]
      },
      {
        path: '/saas/finance',
        component: RouteView,
        name: 'saasFinance',
        redirect: '/saas/agencyWithdraw',
        meta: { title: '财务', icon: 'dollar', permission: ['saasProfit'] },
        children: [
          {
            path: '/saas/agencyWithdraw',
            name: 'saasAgencyWithdraw',
            component: RouteView,
            redirect: '/saas/agencyWithdraw/apply',
            meta: { title: '代理商提现', keepAlive: false, permission: ['saasProfitAgent'] },
            children: [
              {
                path: '/saas/agencyWithdraw/apply',
                name: 'saasAgencyWithdrawApply',
                component: () => import('@/views/saas/AgencyWithdrawApply'),
                meta: { title: '提现申请', keepAlive: false, permission: ['saasProfitAgent'] }
              },
              {
                path: '/saas/agencyWithdraw/record',
                name: 'saasAgencyWithdrawRecord',
                component: () => import('@/views/saas/AgencyWithdrawRecord'),
                meta: { title: '提现记录', keepAlive: false, permission: ['saasProfitAgent'] }
              }
            ]
          },
          {
            path: '/saas/profit',
            name: 'saasProfit',
            component: () => import('@/views/saas/Profit'),
            meta: { title: '分账记录', keepAlive: false, permission: ['saasProfitSplitAccounts'] }
          },
          {
            path: '/saas/userWithdraw',
            name: 'saasUserWithdraw',
            component: RouteView,
            redirect: '/saas/userWithdraw/apply',
            meta: { title: '用户提现', keepAlive: false, permission: ['saasProfitUserWithdraw'] },
            children: [
              {
                path: '/saas/marketing/distribution/withdrawAudit',
                name: 'saasDistributionWithdrawAudit',
                component: () => import('@/views/saas/marketing/WithdrawAudit'),
                meta: { title: '提现审核', keepAlive: false, permission: ['saasProfitUserWithdraw'] },
              }, {
                path: '/saas/marketing/distribution/withdrawSetting',
                name: 'saasDistributionWithdrawSetting',
                component: () => import('@/views/saas/marketing/WithdrawSetting'),
                meta: { title: '提现设置', keepAlive: false, permission: ['saasProfitUserWithdraw'] },
              }
            ]
          },
          {
            path: '/saas/shoppingMallWithdraw',
            name: 'saasShoppingMallWithdraw',
            component: RouteView,
            redirect: '/saas/shoppingMallWithdraw/apply',
            meta: { title: '商城提现', keepAlive: false, permission: ['saasStoreCash'] },
            children: [
              {
                path: '/saas/shoppingMallWithdraw/apply',
                name: 'saasShoppingMallWithdrawApply',
                component: () => import('@/views/saas/marketing/ShoppingMallWithdraw/apply'),
                meta: { title: '提现审核', keepAlive: false, permission: ['saasStoreCash'] },
              },
              {
                path: '/saas/shoppingMallWithdraw/record',
                name: 'saasShoppingMallWithdrawRecord',
                component: () => import('@/views/saas/marketing/ShoppingMallWithdraw/record'),
                meta: { title: '提现记录', keepAlive: false, permission: ['saasStoreCash'] },
              },
            ]
          }
        ]
      },
      {
        path: '/saas/agencyFinance',
        component: RouteView,
        name: 'saasAgencyFinance',
        redirect: '/saas/withdrawApply',
        meta: { title: '财务', icon: 'dollar', permission: ['saasAgencyFinance'] },
        children: [
          {
            path: '/saas/withdrawApply',
            name: 'agencyWithdrawApply',
            component: () => import('@/views/saas/AgencyWithdraw'),
            meta: { title: '提现申请', keepAlive: false, permission: ['saasAgencyFinance'] }
          },
          {
            path: '/saas/incomeDetail',
            name: 'agencyIncome',
            component: () => import('@/views/saas/AgencyIncome'),
            meta: { title: '收支明细', keepAlive: false, permission: ['saasAgencyFinance'] }
          },
          {
            path: '/saas/flowStatistics',
            name: 'flowStatistics',
            component: () => import('@/views/saas/flowStatistics'),
            meta: { title: '流水统计', keepAlive: false, permission: ['saasBdAgentOrderLog'] }
          }
        ]
      },
      {
        path: '/saas/option',
        component: RouteView,
        name: 'saas_option',
        redirect: '/saas/setting',
        meta: { title: '设置', icon: 'setting', permission: ['saasSetting'] },
        children: [
          {
            path: '/saas/setting',
            name: 'SaasSetting',
            component: () => import('@/views/saas/Setting'),
            meta: { title: '基础设置', keepAlive: false, permission: ['saasSettingBase'] }
          },
          {
            path: '/saas/serviceSetting',
            name: 'SaasServiceSetting',
            component: () => import('@/views/saas/ServiceSetting'),
            meta: { title: '服务商设置', keepAlive: false, permission: ['saasSettingService'] }
          },
          {
            path: '/saas/thirdSetting',
            name: 'SaasThirdSetting',
            component: () => import('@/views/saas/ThirdSetting'),
            meta: { title: '第三方设置', keepAlive: false, permission: ['saasSettingThird'] }
          },
          {
            path: '/saas/ocrSetting',
            name: 'SaasOcrSetting',
            component: () => import('@/views/saas/setting/Ocr'),
            meta: { title: 'ocr设置', keepAlive: false, permission: ['saasOcrSetting'] }
          },
          {
            path: '/saas/clientSetting',
            name: 'SaasClientSetting',
            component: RouteView,
            redirect: '/saas/setting/WechatPay',
            // component: () => import('@/views/saas/ClientSetting'),
            meta: { title: '联盟端设置', permission: ['saasClientSetting'] },//, keepAlive: false
            children: [
              {
                path: '/saas/setting/WechatPay',
                name: 'SaasSettingWechatPay',
                component: () => import('@/views/saas/setting/WechatPay'),
                meta: { title: '联盟微信配置', permission: ['SaasSettingWechatPay'] }
              },
              {
                path: '/saas/setting/AlipayConfig',
                name: 'SaasSettingAliPay',
                component: () => import('@/views/saas/setting/AlipayConfig'),
                meta: { title: '联盟支付宝配置', permission: ['SaasSettingAliPay'] }
              },
              {
                path: '/saas/setting/FoodSetting',
                name: 'FoodSetting',
                component: () => import('@/views/saas/setting/FoodSetting'),
                meta: { title: '点餐设置', permission: ['FoodSetting'] }
              },
              {
                path: '/setting/alliance-upload-wechat',
                name: 'AllianceUploadWechat',
                component: () => import('@/views/setting/AllianceUploadWechat'),
                meta: { title: '联盟微信小程序发布', icon: 'wechat', permission: ['allianceUploadWechat'] }
              },
              {
                path: '/setting/service',
                name: 'AllianceService',
                component: () => import('@/views/setting/AlipayService'),
                meta: { title: '隐私协议', icon: 'wechat', permission: ['allianceUploadWechat'] }
              }
            ]
          },
          {
            path: '/saas/mchSetting',
            name: 'saasSingleStoreSetting',
            component: () => import('@/views/saas/SaasMchSetting'),
            meta: { title: '供应链端设置', keepAlive: false, permission: ['saasSingleStoreSetting'] }
          },
          {
            path: '/saas/saasMchMiniSetting',
            name: 'saasMchMiniSetting',
            // component: () => import('@/views/saas/SaasMchMiniSetting'),
            meta: { title: '服务端小程序', keepAlive: false, permission: ['saasMchMiniSetting'] },
            component: RouteView,
            redirect: '/saas/setting/WechatPay',
            children: [
              {
                path: '/saas/saasMchMiniSetting',
                name: 'saasMchMiniSetting',
                component: () => import('@/views/saas/SaasMchMiniSetting'),
                meta: { title: '服务端小程序配置', permission: ['saasMchMiniSetting'] },
              },
              {
                path: '/saas/SaasMchMiniSettingUpload',
                name: 'saasMchMiniSettingUpload',
                component: () => import('@/views/saas/SaasMchMiniSettingUpload'),
                meta: { title: '服务端小程序上传', permission: ['saasMchMiniSetting'] },
              },
              {
                path: '/saas/SaasMchMiniSettingNotice',
                name: 'saasMchMiniSettingNotice',
                component: () => import('@/views/saas/Notice'),
                meta: { title: '短信通知', permission: ['SaasSmsSetting'] },
              }
            ]
          },
          {
            path: '/saas/upgrade',
            name: 'saasUpgrade',
            component: () => import('@/views/setting/Update'),
            meta: { title: '系统升级', keepAlive: false, permission: ['saasUpgrade'] }
          },
          {
            path: '/saas/agreement',
            name: 'saasAgreement',
            component: () => import('@/views/saas/agreement'),
            meta: { title: '协议设置', keepAlive: false, permission: ['saasProtocol'] }
          },
          {
            path: '/saas/adapayBankCard',
            name: 'adapayBankCard',
            component: () => import('@/views/saas/adapayBankCard'),
            meta: { title: '银行卡分账' }
          },
          {
            path: '/setting/timerTaskCopy',
            name: 'timerTaskCopy',
            component: () => import('@/views/setting/timerTaskCopy'),
            meta: { title: '定时任务', permission: ['timerTaskCopy'] }
          }
        ]
      },
      // 营销管理
      {
        path: '/saasAuth',
        name: 'AuthManage',
        component: RouteView,
        redirect: '/saasAuth/admin-list',
        meta: { title: '员工', icon: 'safety', permission: ['saasAuthManage'] },
        children: [
          {
            path: '/saasAuth/admin-list',
            name: 'saasAuthAdminList',
            component: () => import('@/views/auth/AdminList'),
            meta: { title: '账号管理', permission: ['saasAccountManage'], type:0 }
          },
          {
            path: '/saasAuth/role-list',
            name: 'saasAuthRoleList',
            component: () => import('@/views/auth/RoleList'),
            meta: { title: '角色管理', permission: ['saasRoleManage'] , type:0}
          }
        ]
      },
      // 端口
      {
        path: '/saasChannel',
        name: 'saasChannel',
        component: RouteView,
        redirect: '/saasChannel/weixin',
        meta: { title: '渠道', icon: 'safety', permission: ['channel'] },
        children: [
          {
            path: '/saasChannel/weixin',
            name: 'saasChannelWeixinSetting',
            component: RouteView,
            redirect: '/saasChannel/wechatConfig',
            meta: { title: '微信小程序', permission: ['appletManagementWechat'] },
            children: [
              {
                path: '/saasChannel/wechatConfig',
                name: 'saasChannelWechatConfig',
                component: () => import('@/views/setting/WechatConfig'),
                meta: {
                  title: '参数配置',
                  permission: ['wechatConfig'], 
                  type:1,
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/applet',
                name: 'saasChannelApplet',
                component: () => import('@/views/setting/AppletManagement'),
                meta: { 
                  title: '小程序管理', 
                  permission: ['miniConfig'],
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/applet/chooseType',
                name: 'saasChannelAppletChooseType',
                hidden: true,
                meta: {
                  title: '新建小程序',
                  permission: ['miniConfig'],
                  hasChannel:true
                },
                component: () => import('@/views/setting/ChooseType')
              },
              {
                path: '/saasChannel/applet/completeInformation',
                name: 'saasChannelAppletCompleteInformation',
                hidden: true,
                meta: {
                  title: '完善小程序',
                  permission: ['miniConfig']
                },
                component: () => import('@/views/setting/CompleteInformation')
              },
              {
                path: '/saasChannel/applet/writeInformation',
                name: 'saasChannelAppletWriteInformation',
                hidden: true,
                meta: {
                  title: '填写资料',
                  permission: ['miniConfig']
                },
                component: () => import('@/views/setting/WriteInformation')
              },
              {
                path: '/saasChannel/payIncoming',
                name: 'saasChannelPayIncoming',
                component: () => import('@/views/setting/merchantIncomingParts/wechat'),
                meta: { 
                  title: '支付进件', 
                  permission: ['payIncoming'],  
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/payIncoming/edit',
                name: 'ssaasChannelPayIncomingEdit',
                meta: {
                  title: '编辑新增',
                  permission: ['payIncoming'],
                  hasChannel:true
                },
                hidden: true,
                component: () => import('@/views/setting/merchantIncomingParts/edit')
              },
              {
                path: '/saasChannel/upload-wechat',
                name: 'UploadWechat',
                component: () => import('@/views/setting/UploadWechat'),
                meta: { title: '小程序发布', icon: 'wechat', permission: ['uploadWechat'] }
              },
            ]
          },
          {
            path: '/saasChannel/H5',
            name: 'saasChannelH5',
            component: RouteView,
            redirect: '/saasChannel/saasChannelH5',
            meta: { title: '手机H5', permission: ['h5Management'] },
            children: [
              {
                path: '/saasChannel/saasChannelH5',
                name: 'saasChannelH5',
                component: () => import('@/views/setting/H5'),
                meta: {
                  title: '入口地址',
                  permission: ['h5Management']
                }
              },
            ]
          },
          {
            path: '/saasChannel/weixinWeb',
            name: 'saasChannelWeixinWebSetting',
            component: RouteView,
            redirect: '/saasChannel/wechatConfigWeixinWeb',
            meta: { title: '微信公众号', permission: ['wechatAccountManagement'] },
            children: [
              {
                path: '/saasChannel/wechatConfigWeixinWeb',
                name: 'saasChannelWechatConfigWeixinWeb',
                component: () => import('@/views/setting/WechatConfig'),
                meta: {
                  title: '参数配置',
                  permission: ['wechatAccountConfig'], 
                  type:2,
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/wechatConfigMenu',
                name: 'saasChannelWechatConfigMenu',
                component: () => import('@/views/setting/wechatConfigMenuList'),
                meta: {
                  title: '菜单设置',
                  permission: ['wechatAccountMenuConfig']
                }
              },
              {
                path: '/saasChannel/wechatConfigMenuEidt',
                name: 'saasChannelWechatConfigMenuEidt',
                component: () => import('@/views/setting/wechatConfigMenuEdit'),
                hidden: true,
                meta: {
                  title: '菜单设置详情',
                  permission: ['wechatAccountMenuConfig']
                }
              },
            ]
          },
          {
            path: '/saasChannel/alipay',
            name: 'saasChannelAlipaySetting',
            component: RouteView,
            redirect: '/saasChannel/AlipayConfig',
            meta: { title: '支付宝小程序', permission: ['appletManagementAlipay'] },
            children: [
              {
                path: '/saasChannel/AlipayConfig',
                name: 'saasChannelAlipayConfig',
                component: () => import('@/views/setting/AlipayConfig'),
                meta: {
                  title: '基础配置',
                  permission: ['alipayConfig'],
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/alipayCertificate',
                name: 'saasChannelAlipayCertificate',
                component: () => import('@/views/setting/AlipayCertificateConfig'),
                meta: {
                  title: '证书配置',
                  permission: ['alipayCertConfig']
                }
              },
              {
                path: '/saasChannel/appletAlipay',
                name: 'saasChannelAppletAlipay',
                component: () => import('@/views/setting/AlipayApplet'),
                meta: { 
                  title: '小程序管理', 
                  permission: ['miniConfigAlipay'],
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/appletAlipay/writeInformationAlipay',
                name: 'saasChannelWriteInformationAlipay',
                hidden: true,
                meta: {
                  title: '小程序详情',
                  permission: ['miniConfigAlipay']
                },
                component: () => import('@/views/setting/writeInformationAlipay/index')
              },
              {
                path: '/saasChannel/appletManagement/chooseType',
                name: 'saasChannelAppletManagementChooseType',
                hidden: true,
                meta: {
                  title: '新建小程序',
                  permission: ['miniConfigAlipay'],
                  hasChannel:true
                },
                component: () => import('@/views/setting/ChooseType')
              },
              {
                path: '/saasChannel/alipayVipCardList',
                name: 'saasChannelAlipayVipCardList',
                component: () => import('@/views/marketing/alipayPromotion/vipCardList'),
                meta: {
                  title: '支付宝会员卡',
                  permission: ['alipayPromotionCard'],
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/alipayVipCardEdit',
                name: 'saasChannelAlipayVipCardEdit',
                component: () => import('@/views/marketing/alipayPromotion/vipCardEdit'),
                hidden: true,
                meta: {
                  title: '会员卡设置',
                  permission: ['alipayPromotionCard']
                }
              },
              {
                path: '/saasChannel/upload-alipay',
                name: 'UploadAlipay',
                component: () => import('@/views/setting/UploadAlipay'),
                meta: { title: '小程序发布', icon: 'alipay', permission: ['uploadAlipay'] }
              },
            ]
          },
          {
            path: '/saasChannel/app',
            name: 'saasChannelApp',
            component: RouteView,
            redirect: '/saasChannel/appSetting',
            meta: { title: 'APP', permission: ['appManagement'] },
            children: [
              {
                path: '/saasChannel/appSetting',
                name: 'saasChannelAppSetting',
                component: () => import('@/views/setting/appSetting'),
                meta: {
                  title: '基础设置',
                  permission: ['appManagement'], 
                  type:3,
                  hasChannel:true
                }
              },
              {
                path: '/saasChannel/appPayConfig',
                name: 'saasChannelAppPayConfig',
                component: () => import('@/views/setting/WechatConfig'),
                meta: {
                  title: '支付设置',
                  permission: ['appPayConfig'], 
                  type:3,
                  hasChannel:true
                }
              },
            ]
          }
        ]
      },
      // 门店商品
      // 门店数据统计
      {
        path: '/outletStatistics',
        name: 'OutletStatistics',
        component: RouteView,
        redirect: '/outletStatistics/index',
        meta: { title: '统计', icon: 'radar-chart', permission: ['outletStatistics'] },
        children: [
          {
            path: '/outletStatistics/index',
            name: 'OutletStatisticsIndex',
            hidden: true,
            component: () => import('@/views/outlet/outletStatistics/index'),
            meta: { title: '数据统计', keepAlive: false, permission: ['outletStatistics'] }
          }
        ]
      },
      {
        path: '/outletGoods',
        name: 'outletGoods',
        component: RouteView,
        redirect: '/outletGoods/list',
        meta: { title: '商品', icon: 'shopping', permission: ['outletGoods'] },
        children: [
          {
            path: '/outletGoods/list',
            name: 'OutletGoodsList',
            hidden: true,
            component: () => import('@/views/outlet/outletGoods/Goods'),
            meta: { title: '门店商品', keepAlive: false, permission: ['outletGoods'] }
          },
          {
            path: '/outletGoods/detail',
            name: 'OutletGoodsDetail',
            hidden: true,
            component: () => import('@/views/outlet/outletGoods/Edit'),
            meta: { title: '查看商品', keepAlive: false, permission: ['outletGoods'] }
          }
        ]
      },
      // 门店订单管理
      {
        path: '/outletOrder',
        name: 'OutletOrderManage',
        component: RouteView,
        redirect: '/outletOrder/list',
        meta: { title: '订单', icon: 'profile', permission: ['outletOrderManage'] },
        children: [
          {
            path: '/outletOrder/list',
            name: 'OutletOrderList',
            component: () => import('@/views/outlet/outletOrder/List'),
            meta: { title: '订单列表', permission: ['outletOrderList'] }
          },
          {
            path: '/outletOrder/offline-list',
            name: 'OutletOrderOfflineList',
            component: () => import('@/views/outlet/outletOrder/OfflineList'),
            meta: { title: '自提订单', permission: ['outletOrderOfflineList'] }
          },
          {
            path: '/outletOrder/refund-list',
            name: 'OutletOrderRefundList',
            component: () => import('@/views/outlet/outletOrder/RefundList'),
            meta: { title: '售后订单', permission: ['outletOrderRefundList'] }
          },
          {
            path: '/outletOrder/order-details',
            name: 'OutletOrderDetails',
            hidden: true,
            component: () => import('@/views/outlet/outletOrder/OrderDetails'),
            meta: { title: '订单详情', keepAlive: false, permission: ['outletOrderDetails'] }
          }
        ]
      },
      // 门店管理
      {
        path: '/md-setting',
        name: 'mdSetting',
        component: RouteView,
        redirect: '/md-setting/sub-printer-setting',
        meta: { title: '门店', icon: 'shop', permission: ['mdSetting'] },
        children: [
          // {
          //   path: '/md-setting/printer-setting',
          //   name: 'PrinterSetting',
          //   redirect: '/md-setting/sub-printer-setting',
          //   meta: {
          //     title: '打印设置',
          //     permission: ['SubPrinterSetting']
          //   },children: [
          {
            path: '/md-setting/sub-printer-setting',
            name: 'SubPrinterSetting',
            component: () => import('@/views/mdSetting/SubPrinterSetting'),
            meta: {
              title: '小票打印',
              permission: ['SubPrinterSetting']
            }
          }]
        // }]
      },
      // 门店员工管理
      {
        path: '/outletStaff',
        name: 'OutletStaff',
        component: RouteView,
        redirect: '/outletStaff/list',
        meta: { title: '员工', icon: 'profile', permission: ['outletStaff'] },
        children: [
          {
            path: '/outletStaff/list',
            name: 'OutletStaffList',
            hidden: true,
            component: () => import('@/views/outlet/outletStaff/Staff'),
            meta: { title: '员工列表', permission: ['outletStaff'] }
          }
        ]
      },
      // 门店财务管理
      {
        path: '/outletFinance',
        name: 'OutletFinance',
        component: RouteView,
        redirect: '/outletFinance/Commission',
        meta: { title: '财务', icon: 'profile', permission: ['outletFinance'] },
        children: [
          {
            path: '/outletFinance/commission',
            name: 'OutletCommission',
            hidden: false,
            component: () => import('@/views/outlet/outletFinance/Commission'),
            meta: { title: '佣金明细', permission: ['outletFinance'] }
          },
          {
            path: '/outletFinance/withdraw',
            name: 'OutletWithdraw',
            hidden: false,
            component: () => import('@/views/outlet/outletFinance/Withdraw'),
            meta: { title: '提现明细', permission: ['outletFinance'] }
          },
          {
            path: '/outletFinance/clerk',
            name: 'OutletClerk',
            hidden: false,
            component: () => import('@/views/outlet/outletFinance/Clerk'),
            meta: { title: '核销数据', permission: ['outletFinance'] }
          }
        ]
      },
      // 门店营销
      {
        path: '/orderMealGoods',
        name: 'OrderMealGoods',
        component: RouteView,
        redirect: '/outletFinance/orderMealGoods',
        meta: { title: '营销', icon: 'profile', permission: ['outletFinance'] },
        children: [
          {
            path: '/outletFinance/orderMealGoods',
            name: 'OrderMealGoods',
            hidden: false,
            component: RouteView,
            redirect: '/outletFinance/orderMealGoods',
            meta: { title: '点餐管理', permission: ['outletFinance'] },
            children: [
              {
                path: '/outletFinance/orderMealGoods',
                name: 'OrderMealGoods',
                hidden: true,
                component: () => import('@/views/outlet/outletMarketing/orderMealGoods'),
                meta: { title: '商品管理', permission: ['outletFinance'] }
              },
              {
                path: '/orderMealGoods/addGoods',
                name: 'OrderMealGoodsAdd',
                hidden: true,
                component: () => import('@/views/outlet/outletMarketing/orderMealAddGoods'),
                meta: { title: '添加商品', permission: ['outletFinance'] }
              },
              {
                path: '/outletFinance/orderMealDesk',
                name: 'OrderMealDesk',
                hidden: false,
                component: () => import('@/views/outlet/outletMarketing/oderMealDesk'),
                meta: { title: '餐桌管理', permission: ['outletFinance'] }
              },
              {
                path: '/outletFinance/orderMealSetting',
                name: 'OrderMealSetting',
                hidden: false,
                component: () => import('@/views/outlet/outletMarketing/orderMealSetting'),
                meta: { title: '设置', permission: ['outletFinance'] }
              },
              {
                path: '/outletFinance/orderMealQrcode',
                name: 'OrderMealQrcode',
                hidden: false,
                component: () => import('@/views/outlet/outletMarketing/orderMealQrcode'),
                meta: { title: '设置店铺点餐二维码', permission: ['outletFinance'] }
              },
              {
                path: '/outletFinance/orderMealClassify',
                name: 'OrderMealClassify',
                hidden: false,
                component: () => import('@/views/outlet/outletMarketing/orderMealClassify'),
                meta: { title: '分类', permission: ['outletFinance'] }
              },
              {
                path: '/outletFinance/orderMealSlide',
                name: 'OrderMealSlide',
                component: () => import('@/views/outlet/outletMarketing/orderMealSlide'),
                meta: { title: '点餐轮播图', permission: ['outletFinance'] }
              },
              {
                path: '/outletFinance/accessories',
                name: 'OrderMealAccessories',
                component: () => import('@/views/outlet/outletMarketing/accessories'),
                meta: { title: '加料区', permission: ['outletFinance'] }
              }
            ]
          }
        ]
      },
      // 会员列表
      {
        path: '/outletUser',
        name: 'OutletUser',
        component: RouteView,
        redirect: '/outletUser/list',
        meta: { title: '用户', icon: 'user', permission: ['outletUser'] },
        children: [
          {
            path: '/outletUser/list',
            name: 'OutletUserList',
            hidden: true,
            component: () => import('@/views/outlet/outletUser/List'),
            meta: { title: '用户列表', keepAlive: false, permission: ['outletUser'] }
          }
        ]
      },
      // 门店设置
      {
        path: '/outletSetting',
        name: 'OutletSetting',
        component: RouteView,
        redirect: '/outletSetting/setting',
        meta: { title: '设置', icon: 'setting', permission: ['outletSetting'] },
        children: [
          {
            path: '/outletSetting/setting',
            name: 'OutletSettingIndex',
            hidden: true,
            component: () => import('@/views/outlet/outletSetting/setting'),
            meta: { title: '门店设置', keepAlive: false, permission: ['outletSetting'] }
          }
        ]
      },
      // 门店管理
      {
        path: '/outletManage',
        name: 'OutletManage',
        component: RouteView,
        redirect: '/outletManage/list',
        meta: { title: '门店', icon: 'shopping', permission: ['outletManage'] },
        children: [
          {
            path: '/outletManage/list',
            name: 'OutletManageList',
            hidden: false,
            component: () => import('@/views/outletManage/List'),
            meta: { title: '门店列表', keepAlive: false, permission: ['outletManageList'] }
          },
          {
            path: '/outletManage/audit',
            name: 'OutletManageAudit',
            hidden: false,
            component: () => import('@/views/outletManage/Audit'),
            meta: { title: '门店审核', keepAlive: false, permission: ['outletManageAudit'] }
          },
          {
            path: '/outletManage/goods',
            name: 'OutletManageGoods',
            hidden: false,
            component: () => import('@/views/outletManage/Goods'),
            meta: { title: '门店商品', keepAlive: false, permission: ['outletManageGoods'] }
          },
          {
            path: '/outletManage/order',
            name: 'OutletManageOrder',
            hidden: false,
            component: () => import('@/views/outletManage/Order'),
            meta: { title: '门店订单', keepAlive: false, permission: ['outletManageOrder'] }
          },
          {
            path: '/outletManage/offline',
            name: 'OutletManageOffline',
            hidden: false,
            component: () => import('@/views/outletManage/OfflineList'),
            meta: { title: '自提订单', keepAlive: false, permission: ['outletManagePickUpOrder'] }
          },
          {
            path: '/outletManage/commission',
            name: 'OutletManageCommission',
            hidden: false,
            component: () => import('@/views/outletManage/Commission'),
            meta: { title: '门店佣金', keepAlive: false, permission: ['outletManageCommission'] }
          },
          {
            path: '/outletManage/withdraw',
            name: 'OutletManageWithdraw',
            hidden: false,
            component: () => import('@/views/outletManage/Withdraw'),
            meta: { title: '门店提现', keepAlive: false, permission: ['outletManageWithdraw'] }
          },
          {
            path: '/outletManage/staff',
            name: 'OutletManageStaff',
            hidden: false,
            component: () => import('@/views/outletManage/Staff'),
            meta: { title: '门店员工', keepAlive: false, permission: ['outletManageStaff'] }
          },
          {
            path: '/outletManage/edit',
            name: 'OutletManageEdit',
            hidden: true,
            component: () => import('@/views/outletManage/Edit'),
            meta: { title: '门店编辑', keepAlive: false, permission: ['outletManage'] }
          },
          {
            path: '/outletManage/apply',
            name: 'OutletManageApply',
            hidden: false,
            component: () => import('@/views/outletManage/Apply'),
            meta: { title: '门店申请设置', keepAlive: false, permission: ['outletManageApplySetting'] }
          },
          {
            path: '/outletManage/orderDetail',
            name: 'OutletOrderDetail',
            hidden: true,
            component: () => import('@/views/outletManage/OrderDetails'),
            meta: { title: '订单详情', keepAlive: false, permission: ['outletManagePickUpOrder'] }
          }
        ]
      },
      {
        path: '/third',
        name: 'third',
        component: RouteView,
        redirect: '/yinbao/settIng',
        meta: { title: '三方', icon: 'shopping', permission: ['third'] },
        children: [{
          path: '/yinbao',
          name: 'yinbao',
          redirect: '/yinbao/settIng',
          component: RouteView,
          meta: { title: '银豹', icon: 'profile', permission: ['yinbao'] },
          children: [
            {
              path: '/yinbao/settIng',
              name: 'yinbaoSetting',
              component: () => import('@/views/yinbao/Setting'),
              meta: { permission: ['yinbao'], title: '设置' }
            },
            {
              path: '/yinbao/user-manage',
              name: 'yinbaoUserManagement',
              component: () => import('@/views/yinbao/UserManage'),
              meta: { title: '用户管理', permission: ['yinbao'] }
            },
            {
              path: '/yinbao/offline-list',
              name: 'yinbaoOfflineList',
              component: () => import('@/views/yinbao/OfflineList'),
              meta: { title: '订单', permission: ['yinbao'] }
            },
            {
              path: '/yinbao/order-details',
              name: 'yinbaoOrderDetails',
              hidden: true,
              component: () => import('@/views/yinbao/OrderDetails'),
              meta: { title: '订单详情', keepAlive: false, permission: ['yinbao'] }
            },
          ]
        },
        {
          path: '/purchase',
          name: 'Purchase',
          component: RouteView,
          redirect: '/purchase/goods/list',
          meta: { title: '云仓', permission: ['cloudMerchant'] },
          children: [
            {
              path: '/purchase/goods/list',
              name: 'purchaseGoodsList',
              component: () => import('@/views/purchase/goods/list'),
              meta: { title: '云仓选品库', hidden: true, permission: ['cloudMerchantSelection'] }
            },
            {
              path: '/goods/cloud/list',
              name: 'goodsCloudList',
              component: () => import('@/views/goods/CloudGoods'),
              meta: { title: '我的选品', hidden: true, permission: ['cloudMerchantMyCloud'] }
            },
            {
              path: '/purchase/trans/record',
              name: 'purchaseTransRecord',
              component: () => import('@/views/purchase/trans/record'),
              meta: { title: '云仓转单', hidden: true, permission: ['cloudMerchantTransferOrder'] }
            },
            {
              path: '/purchase/business/balance',
              name: 'businessPurchaseBalance',
              component: () => import('@/views/purchase/business/balance'),
              meta: { title: '我的账户', hidden: true, permission: ['cloudMerchantAccount'] }
            },
            {
              path: '/purchase/setting/setting',
              name: 'purchaseSetting',
              component: () => import('@/views/purchase/setting/setting'),
              meta: { title: '云仓设置', hidden: true, permission: ['cloudMerchantSetting'] }
            },
            {
              path: '/purchase/goods/log',
              name: 'purchaseGoodsUpdateLog',
              component: () => import('@/views/purchase/goods/log'),
              meta: { title: '商品更新记录', hidden: true, permission: ['cloudMerchantSetting'] }
            },
            {
              path: '/purchase/business/recharge',
              name: 'businessPurchaseRecharge',
              hidden: true,
              component: () => import('@/views/purchase/business/recharge'),
              meta: { title: '充值记录', permission: ['cloudMerchantAccount'] }
            },
            {
              path: '/purchase/goods/edit',
              name: 'purchaseGoodsEdit',
              hidden: true,
              component: () => import('@/views/purchase/goods/item'),
              meta: { title: '商品详情', permission: ['cloudMerchantSelection'] }
            },
            {
              path: '/purchase/goods/bandRecord',
              name: 'purchaseGoodsBand',
              hidden: true,
              component: () => import('@/views/purchase/goods/bandRecord'),
              meta: { title: '绑定商品记录', permission: ['cloudMerchant'] }
            }
          ]
        },
        {
          path: '/jushuitan/shop-setting',
          name: 'JushuitanShopSetting',
          meta: { title: '聚水潭', permission: ['jushuitan'] },
          component: () => import('@/views/jushuitan/shop-setting'),
        },
        {
          path: '/scrm/setting',
          name: 'scrmSetting',
          component: () => import('@/views/scrm/setting'),
          meta: { title: 'SCRM', permission: ['scrm'] }
        },
          maltField
        ]
      },
      //
    ]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    // component: UserLayout,
    component: LoginLayout,
    redirect: '/login',
    hidden: true,
    children: [
      {
        path: '/login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      // {
      //   path: '/mch-login',
      //   name: 'mchLogin',
      //   component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      // },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
      },
      {
        path: 'recover',
        name: 'recover',
        component: undefined
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }
]
